Skip to content

Commit

Permalink
Merge pull request #807 from wordpress-mobile/fix/cleanup-zwj-continue
Browse files Browse the repository at this point in the history
Don't bail when ZWJ cleanup found end-of-text marker
  • Loading branch information
hypest authored Apr 15, 2019
2 parents 7e968c3 + 3a6ab4f commit 1400adb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aztec/src/main/kotlin/org/wordpress/aztec/AztecParser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,9 @@ class AztecParser @JvmOverloads constructor(val plugins: List<IAztecPlugin> = li
do {
lastIndex = text.lastIndexOf(Constants.ZWJ_CHAR, lastIndex)
if (lastIndex == text.length - 1) {
// ZWJ at the end of text will serve as end-of-text marker so, let it be and finish.
return
// ZWJ at the end of text will serve as end-of-text marker so, let it be and continue cleaning up ZWJs
lastIndex--
continue
}

if (lastIndex > -1) {
Expand Down

0 comments on commit 1400adb

Please sign in to comment.