Skip to content

Commit 48d287e

Browse files
committed
don't check whether we are on a block for PrependNewLineOnStyledSpecialTextEvent, as we need to always operate on it if the sequence is found
1 parent 73ed2a5 commit 48d287e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/watchers/event/sequence/known/space/API26PrependNewLineOnStyledSpecialTextEvent.kt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,7 @@ class API26PrependNewLineOnStyledSpecialTextEvent : UserOperationEvent() {
6464
if (firstEvent.beforeEventData.textBefore?.length == lastEvent.afterEventData.textAfter!!.length) {
6565
//but, middle event has a new line at the start index of change
6666
if (midEvent.onEventData.textOn!![midEvent.onEventData.start] == Constants.NEWLINE) {
67-
// okay sequence has been observed completely, let's make sure we are not within a Block
68-
if (!isEventFoundWithinABlock(firstEvent.beforeEventData)) {
69-
return ObservedOperationResultType.SEQUENCE_FOUND
70-
} else {
71-
// we're within a Block, things are going to be handled by the BlockHandler so let's just request
72-
// a queue clear only
73-
return ObservedOperationResultType.SEQUENCE_FOUND_CLEAR_QUEUE
74-
}
67+
return ObservedOperationResultType.SEQUENCE_FOUND
7568
}
7669
}
7770
}

0 commit comments

Comments
 (0)