Skip to content

Commit 918fb03

Browse files
committed
Add a unit test for the fix
1 parent d760083 commit 918fb03

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

aztec/src/test/kotlin/org/wordpress/aztec/AztecParserTest.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,4 +1219,13 @@ class AztecParserTest : AndroidTestCase() {
12191219
val output = mParser.toHtml(span)
12201220
Assert.assertEquals(output, inputAfterParser)
12211221
}
1222+
1223+
@Test
1224+
@Throws(Exception::class)
1225+
fun parseHtmlToSpanToHtmlParagraphInsideHiddenSpan_isEqual() {
1226+
val input = "<p>a</p><div><p>b</p></div><p>c</p>"
1227+
val span = SpannableString(mParser.fromHtml(input, RuntimeEnvironment.application.applicationContext))
1228+
val output = mParser.toHtml(span)
1229+
Assert.assertEquals(input, output)
1230+
}
12221231
}

0 commit comments

Comments
 (0)