You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/lang/DocumentationPreprocessor.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ class DocumentationPreprocessor : KotlinIntegration {
104
104
"li"-> {
105
105
// If this list item holds a sublist, then we essentially just want to line break right away and
106
106
// render the nested list as normal.
107
-
val prefix =if (node.childNode(0).nodeName() =="ul") "\n"else""
107
+
val prefix =if (node.childNodes().firstOrNull()?.nodeName() =="ul") "\n"else""
Copy file name to clipboardExpand all lines: codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/lang/DocumentationPreprocessorTest.kt
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,17 @@ class DocumentationPreprocessorTest {
94
94
inputTest(input, expected)
95
95
}
96
96
97
+
@Test
98
+
fun`it renders lists with empty list items`() {
99
+
val input ="<p>an unordered list with empty list items:</p><ul><li></li><li></li></ul>"
100
+
val expected ="""
101
+
an unordered list with empty list items:
102
+
+
103
+
+
104
+
""".trimIndent()
105
+
inputTest(input, expected)
106
+
}
107
+
97
108
@Test
98
109
fun`it renders basic formatters`() {
99
110
val input ="<strong>bold text</strong><br/><em>italic text</em>"
0 commit comments