mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-17 07:22:45 +00:00
add test & fix for another url detection auto-space issue
This commit is contained in:
parent
ea17006570
commit
0187beeae5
3 changed files with 14 additions and 3 deletions
|
@ -32,7 +32,8 @@ fun nonWordCodePointAndNoSpaceBeforeCursor(s: CharSequence, spacingAndPunctuatio
|
|||
loopOverCodePointsBackwards(s) {
|
||||
if (!space && Character.isWhitespace(it))
|
||||
space = true
|
||||
if (!nonWordCodePoint && !spacingAndPunctuations.isWordCodePoint(it))
|
||||
// treat double quote like a word codepoint for the purpose of this function (not great, maybe clarify name, or extend list of chars?)
|
||||
if (!nonWordCodePoint && !spacingAndPunctuations.isWordCodePoint(it) && it != '"'.code)
|
||||
nonWordCodePoint = true
|
||||
space && nonWordCodePoint // stop if both are found
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue