We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86008eb commit 445fef5Copy full SHA for 445fef5
aztec/src/test/kotlin/org/wordpress/aztec/HeadingTest.kt
@@ -234,4 +234,20 @@ class HeadingTest() {
234
editText.text.delete(mark - 1, mark)
235
Assert.assertEquals("<h1 foo=\"bar\">Heading 1unstyled</h1>", editText.toHtml())
236
}
237
+
238
+ @Test
239
+ @Throws(Exception::class)
240
+ fun addHeading_issue289() {
241
+ editText.fromHtml("<h1>Heading 1</h1>")
242
243
+ safeAppend(editText, "\n")
244
245
+ editText.setSelection(safeLength(editText))
246
+ editText.toggleFormatting(TextFormat.FORMAT_HEADING_2)
247
+ Assert.assertEquals("<h1>Heading 1</h1><h2></h2>", editText.toHtml())
248
249
+ safeAppend(editText, "Heading 2")
250
+ Assert.assertEquals("<h1>Heading 1</h1><h2>Heading 2</h2>", editText.toHtml())
251
+ }
252
253
0 commit comments