Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't bail when ZWJ cleanup found end-of-text marker #807

Merged
merged 1 commit into from
Apr 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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