mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-07-06 12:02:49 +00:00
Prevent infinite loop for single-word texts (#7327)
This commit is contained in:
parent
0eb6569674
commit
b548b29b2b
@ -112,7 +112,7 @@ function diffPartsToChars(text1,text2,mode) {
|
|||||||
if(mode === "words") {
|
if(mode === "words") {
|
||||||
regexpResult = searchRegexp.exec(text);
|
regexpResult = searchRegexp.exec(text);
|
||||||
lineEnd = searchRegexp.lastIndex;
|
lineEnd = searchRegexp.lastIndex;
|
||||||
if(lineEnd === null) {
|
if(regexpResult === null) {
|
||||||
lineEnd = text.length;
|
lineEnd = text.length;
|
||||||
}
|
}
|
||||||
lineEnd = --lineEnd;
|
lineEnd = --lineEnd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user