Skip to content

Commit 7f221ea

Browse files
committed
Changed conditions for visual newline removal during post processing.
1 parent 899d162 commit 7f221ea

File tree

1 file changed

+1
-5
lines changed
  • aztec/src/main/kotlin/org/wordpress/aztec/source

1 file changed

+1
-5
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/source/Format.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,7 @@ object Format {
347347
text.insert(spanEnd, "\n")
348348
}
349349

350-
//remove visual newline marking around comment and line spans to add a space above and below them in source editor
351-
if (spanStart > 0 && (
352-
text.getSpans(spanStart - 1, spanEnd, AztecCommentSpan::class.java).isNotEmpty() ||
353-
text.getSpans(spanStart - 1, spanEnd, CommentSpan::class.java).isNotEmpty() ||
354-
text.getSpans(spanStart - 1, spanEnd, AztecHorizontalLineSpan::class.java).isNotEmpty())) {
350+
if (text.getSpans(spanStart, spanEnd, AztecQuoteSpan::class.java).isEmpty()) {
355351
text.getSpans(spanStart, spanEnd, AztecVisualLinebreak::class.java).forEach { text.removeSpan(it) }
356352
}
357353

0 commit comments

Comments
 (0)