diff options
Diffstat (limited to 'plugins')
4 files changed, 19 insertions, 9 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 304b96fa..727b009c 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -111,6 +111,12 @@ open class HtmlRenderer( ) { childrenCallback() } node.extra[InsertTemplateExtra] != null -> node.extra[InsertTemplateExtra]?.let { templateCommand(it.command) } ?: Unit + node.hasStyle(ListStyle.DescriptionTerm) -> DT(emptyMap(), consumer).visit { + this@wrapGroup.childrenCallback() + } + node.hasStyle(ListStyle.DescriptionDetails) -> DD(emptyMap(), consumer).visit { + this@wrapGroup.childrenCallback() + } else -> childrenCallback() } } @@ -294,12 +300,16 @@ open class HtmlRenderer( node: ContentList, pageContext: ContentPage, sourceSetRestriction: Set<DisplaySourceSet>? - ) = if (node.ordered) { - ol { buildListItems(node.children, pageContext, sourceSetRestriction) } - } else if (node.hasStyle(ListStyle.DescriptionList)) { - dl { buildListItems(node.children, pageContext, sourceSetRestriction) } - } else { - ul { buildListItems(node.children, pageContext, sourceSetRestriction) } + ) = when { + node.ordered -> { + ol { buildListItems(node.children, pageContext, sourceSetRestriction) } + } + node.hasStyle(ListStyle.DescriptionList) -> { + dl { buildListItems(node.children, pageContext, sourceSetRestriction) } + } + else -> { + ul { buildListItems(node.children, pageContext, sourceSetRestriction) } + } } open fun DL.buildListItems( diff --git a/plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt b/plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt index 2b4317c5..c38edea8 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt @@ -46,7 +46,7 @@ open class DocTagToContentConverter : CommentsToContentConverter { ordered, dci, sourceSets.toDisplaySourceSets(), - if (newStyles.isEmpty()) styles else styles + newStyles, + styles + newStyles, ((PropertyContainer.empty<ContentNode>()) + SimpleAttr("start", start.toString())) ) ) diff --git a/plugins/base/src/test/kotlin/renderers/html/ListStylesTest.kt b/plugins/base/src/test/kotlin/renderers/html/ListStylesTest.kt index d578ba5e..8b11dad1 100644 --- a/plugins/base/src/test/kotlin/renderers/html/ListStylesTest.kt +++ b/plugins/base/src/test/kotlin/renderers/html/ListStylesTest.kt @@ -38,4 +38,4 @@ class ListStylesTest : HtmlRenderingOnlyTestBase() { ) ) } -}
\ No newline at end of file +} diff --git a/plugins/base/src/test/kotlin/transformers/CommentsToContentConverterTest.kt b/plugins/base/src/test/kotlin/transformers/CommentsToContentConverterTest.kt index 6d8730f1..9a77172b 100644 --- a/plugins/base/src/test/kotlin/transformers/CommentsToContentConverterTest.kt +++ b/plugins/base/src/test/kotlin/transformers/CommentsToContentConverterTest.kt @@ -473,4 +473,4 @@ class CommentsToContentConverterTest { } } } -}
\ No newline at end of file +} |