Skip to content

Commit e394a96

Browse files
committed
Add comment about repelling
1 parent fbd0503 commit e394a96

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ class AztecParser {
100100
// add visual newlines at starts
101101
spanned.getSpans(0, spanned.length, AztecSurroundedWithNewlines::class.java).forEach {
102102
val parent = AztecNestable.getParent(spanned, SpanWrapper(spanned, it))
103+
104+
// a list item "repels" a child list so the list will appear in the next line
103105
val repelling = (parent?.span is AztecListItemSpan) && (it is AztecListSpan)
104106

105107
val spanStart = spanned.getSpanStart(it)
@@ -195,6 +197,8 @@ class AztecParser {
195197

196198
spanned.getSpans(0, spanned.length, AztecSurroundedWithNewlines::class.java).forEach {
197199
val parent = AztecNestable.getParent(spanned, SpanWrapper(spanned, it))
200+
201+
// a list item "repels" a child list so the list will appear in the next line
198202
val repelling = (parent?.span is AztecListItemSpan) && (it is AztecListSpan)
199203

200204
val spanStart = spanned.getSpanStart(it)

0 commit comments

Comments
 (0)