Skip to content

Commit 19c26c6

Browse files
committed
Fixed IOB crash.
1 parent 5843549 commit 19c26c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class AztecParser {
180180
val spanEnd = spanned.getSpanEnd(it)
181181

182182
// block spans include a newline at the end, we need to account for that
183-
val newlineExpected = if (it is AztecBlockSpan) spanEnd - 1 else spanEnd
183+
val newlineExpected = if (it is AztecBlockSpan && spanEnd > 0) spanEnd - 1 else spanEnd
184184

185185
if (spanEnd == spanned.length) {
186186
// no visual newline if at text end

0 commit comments

Comments
 (0)