aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/transformers
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/transformers')
-rw-r--r--core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt b/core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt
index 5e351d95..d7837ca2 100644
--- a/core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt
+++ b/core/src/main/kotlin/transformers/DefaultDocumentationToPageTransformer.kt
@@ -72,7 +72,7 @@ class DefaultDocumentationToPageTransformer(
private fun contentForClass(c: Class) = content(DCI(c.dri, platformData)) {
header(1) { text(c.name) }
- c.rawDocstrings.forEach { markdown(it, c) }
+ c.rawDocstrings.forEach { comment(it, c) }
block("Constructors", c.constructors) {
link(it.name, it.dri)
signature(it)
@@ -145,6 +145,9 @@ class DefaultDocumentationToPageTransformer(
fun link(text: String, address: DRI) {
contents += ContentLink(text, address, dci)
}
+ fun comment(raw: String, node: DocumentationNode<*>) {
+ contents += ContentComment(markdownConverter.buildContent(parseMarkdown(raw), dci, node), dci)
+ }
fun markdown(raw: String, node: DocumentationNode<*>) {
contents += markdownConverter.buildContent(parseMarkdown(raw), dci, node)