Skip to content

Commit 272f421

Browse files
committed
Remove checking if the content is in the body or not. The method is called only "in body"
1 parent 2724e88 commit 272f421

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/handlers/HeadingHandler.kt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,7 @@ class HeadingHandler : BlockHandler<AztecHeadingSpan>(AztecHeadingSpan::class.ja
3131
// for the end-of-text marker event in order to attach the new list item to it when that happens.
3232

3333
override fun handleNewlineInBody() {
34-
if (newlineIndex == block.end - 2) {
35-
// newline added at the end of the block (right before its visual newline) so, just end the block and
36-
// not add a new block after it
37-
} else {
38-
// newline added at some position inside the block. Let's split the block into two
39-
cloneHeading(text, block.span, newlineIndex + 1, block.end)
40-
}
41-
34+
cloneHeading(text, block.span, newlineIndex + 1, block.end)
4235
block.end = newlineIndex + 1
4336
}
4437

0 commit comments

Comments
 (0)