Skip to content

Commit 1400adb

Browse files
authored
Merge pull request #807 from wordpress-mobile/fix/cleanup-zwj-continue
Don't bail when ZWJ cleanup found end-of-text marker
2 parents 7e968c3 + 3a6ab4f commit 1400adb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/AztecParser.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,9 @@ class AztecParser @JvmOverloads constructor(val plugins: List<IAztecPlugin> = li
335335
do {
336336
lastIndex = text.lastIndexOf(Constants.ZWJ_CHAR, lastIndex)
337337
if (lastIndex == text.length - 1) {
338-
// ZWJ at the end of text will serve as end-of-text marker so, let it be and finish.
339-
return
338+
// ZWJ at the end of text will serve as end-of-text marker so, let it be and continue cleaning up ZWJs
339+
lastIndex--
340+
continue
340341
}
341342

342343
if (lastIndex > -1) {

0 commit comments

Comments
 (0)