Other minor frontend.util cleanups#5629
Merged
NiLuJe merged 16 commits intokoreader:masterfrom Nov 23, 2019
Merged
Conversation
Minor optimization
Unsigned maths, shifts are safe
Keep the last / 1024 so as not to lose too much precision, since we want a single decimal.
0x400 == 1024 == 2^10
Frenzie
approved these changes
Nov 22, 2019
Member
Frenzie
left a comment
There was a problem hiding this comment.
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.
Member
Author
Candy cane punctuation marks! :D |
Member
Author
|
(And by "big numbers", I mean 64bit, i.e., > UINT32_MAX) |
poire-z
reviewed
Nov 22, 2019
Lua's native handling of arithmetic kinda got in the way, besides the readability issues ;).
poire-z
approved these changes
Nov 22, 2019
It's a crappier unicodeCodepointToUtf8 ;).
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 ;).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shouldn't have kept that tab open ;p.
This change is