Skip to content

Commit d8b246c

Browse files
committed
use one liner
1 parent a2e8a88 commit d8b246c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/lang/DocumentationPreprocessor.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,9 @@ class DocumentationPreprocessor : KotlinIntegration {
102102
}
103103
}
104104
"li" -> {
105-
val childNode = if (node.childNodes().isNotEmpty()) node.childNode(0) else null
106-
107105
// If this list item holds a sublist, then we essentially just want to line break right away and
108106
// render the nested list as normal.
109-
val prefix = if (childNode?.nodeName() == "ul") "\n" else ""
107+
val prefix = if (node.childNodes().firstOrNull()?.nodeName() == "ul") "\n" else ""
110108
builder.append("$listPrefix+ $prefix")
111109
}
112110
"ul", "ol" -> {

0 commit comments

Comments
 (0)