diff options
author | Błażej Kardyś <bkardys@virtuslab.com> | 2020-03-11 13:05:14 +0100 |
---|---|---|
committer | Błażej Kardyś <bkardys@virtuslab.com> | 2020-03-11 13:10:16 +0100 |
commit | 5636115aee8d13870f0d3f172667fca1b3f78276 (patch) | |
tree | a7b3621bf88ee298887e57dcbcd039f5df1f34cd /plugins/base/src/main/kotlin/translators | |
parent | 11b223daa2c54d2b86efb5e6054fd7205ed0b37a (diff) | |
download | dokka-5636115aee8d13870f0d3f172667fca1b3f78276.tar.gz dokka-5636115aee8d13870f0d3f172667fca1b3f78276.tar.bz2 dokka-5636115aee8d13870f0d3f172667fca1b3f78276.zip |
Classlike header and other ui fixes
Diffstat (limited to 'plugins/base/src/main/kotlin/translators')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt | 1 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/translators/psi/JavadocParser.kt | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt index c82af936..3fc9592a 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt @@ -76,6 +76,7 @@ open class DefaultPageCreator( } protected open fun contentForClasslike(c: Classlike) = contentBuilder.contentFor(c) { + header(1) { text(c.name.orEmpty()) } +buildSignature(c) +contentForComments(c) diff --git a/plugins/base/src/main/kotlin/translators/psi/JavadocParser.kt b/plugins/base/src/main/kotlin/translators/psi/JavadocParser.kt index 5b9af028..a791f256 100644 --- a/plugins/base/src/main/kotlin/translators/psi/JavadocParser.kt +++ b/plugins/base/src/main/kotlin/translators/psi/JavadocParser.kt @@ -59,7 +59,6 @@ class JavadocParser( is PsiInlineDocTag -> listOfNotNull(convertInlineDocTag(it)) is PsiDocParamRef -> listOfNotNull(it.toDocumentationLink()) is PsiDocTagValue, - is PsiWhiteSpace -> listOfNotNull(Text(it.text)) is LeafPsiElement -> Jsoup.parse(it.text).body().childNodes().mapNotNull { convertHtmlNode(it) } else -> null } @@ -74,7 +73,7 @@ class JavadocParser( private fun createBlock(element: Element): DocTag { val children = element.childNodes().mapNotNull { convertHtmlNode(it) } return when (element.tagName()) { - "p" -> P(children) + "p" -> P(listOf(Br, Br) + children) "b" -> B(children) "strong" -> Strong(children) "i" -> I(children) @@ -85,7 +84,6 @@ class JavadocParser( "ol" -> Ol(children) "li" -> Li(children) //"a" -> createLink(element, children) // TODO: add proper inline link handling - "br" -> Br else -> Text(body = element.ownText()) } } |