diff options
Diffstat (limited to 'plugins/base/src/main')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt | 22 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/pages/comments/DocTagToContentConverter.kt | 2 |
2 files changed, 17 insertions, 7 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())) ) ) |