Skip to content

Other minor frontend.util cleanups#5629

Merged
NiLuJe merged 16 commits intokoreader:masterfrom
NiLuJe:master
Nov 23, 2019
Merged

Other minor frontend.util cleanups#5629
NiLuJe merged 16 commits intokoreader:masterfrom
NiLuJe:master

Conversation

@NiLuJe
Copy link
Copy Markdown
Member

@NiLuJe NiLuJe commented Nov 22, 2019

Shouldn't have kept that tab open ;p.


This change is Reviewable

Copy link
Copy Markdown
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 4 files at r1.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @NiLuJe)


frontend/apps/reader/modules/readerdictionary.lua, line 570 at r1 (raw file):

    text = text:gsub("\xE2\x80\x99", "'") -- U+2019 (right single quotation mark)
    -- Strip punctuation characters around selection
    text = util.stripePunctuations(text)

Hehe, that one bothers me every time I see it.

@NiLuJe
Copy link
Copy Markdown
Member Author

NiLuJe commented Nov 22, 2019

Reviewed 3 of 4 files at r1.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @NiLuJe)

frontend/apps/reader/modules/readerdictionary.lua, line 570 at r1 (raw file):

    text = text:gsub("\xE2\x80\x99", "'") -- U+2019 (right single quotation mark)
    -- Strip punctuation characters around selection
    text = util.stripePunctuations(text)

Hehe, that one bothers me every time I see it.

Candy cane punctuation marks! :D

@NiLuJe
Copy link
Copy Markdown
Member Author

NiLuJe commented Nov 22, 2019

(And by "big numbers", I mean 64bit, i.e., > UINT32_MAX)

Lua's native handling of arithmetic kinda got in the way,
besides the readability issues ;).
It's a crappier unicodeCodepointToUtf8 ;).
@NiLuJe NiLuJe merged commit d8e0b17 into koreader:master Nov 23, 2019
@Frenzie Frenzie added this to the 2019.12 milestone Nov 24, 2019
mwoz123 pushed a commit to mwoz123/koreader that referenced this pull request Mar 29, 2020
* Resync fixUtf8 w/ upstream
* Fix lastIndexOf desc
* Drop unichar usage, it's a crappier unicodeCodepointToUtf8 ;).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants