Skip to content

Commit ee83fa8

Browse files
committed
Add detail about empty html elements in the comment
1 parent bd1c9fa commit ee83fa8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ class AztecTagHandler(val context: Context, val plugins: List<IAztecPlugin> = Ar
187187

188188
private fun end(output: Editable, kind: Class<*>) {
189189
// Get most recent tag type from the stack instead of `getLast()`. This is a speed optimization as `getLast()`
190-
// doesn't know that the tags are in fact nested and in pairs (since it's html)
190+
// doesn't know that the tags are in fact nested and in pairs (since it's html), including empty html elements
191+
// (they are treated as pairs by tagsoup anyway).
191192
val last = if (tagStack.size > 0 && kind.equals(tagStack[tagStack.size - 1].javaClass)) {
192193
tagStack.removeAt(tagStack.size - 1) // remove and return the top mark on the stack
193194
} else {

0 commit comments

Comments
 (0)