aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/translators/psi
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2021-12-06 16:20:51 +0300
committerIgnat Beresnev <ignat.beresnev@jetbrains.com>2021-12-06 16:20:51 +0300
commitc68c05a1e8876e9b8555df7bcdfeaca3e100f0d1 (patch)
treed9c20d2118d6679175ef8ab9f7dfc6d49aba5af3 /plugins/base/src/main/kotlin/translators/psi
parent35a69e0322fcd271dccadcc2ee8cbb61dcafe62e (diff)
downloaddokka-c68c05a1e8876e9b8555df7bcdfeaca3e100f0d1.tar.gz
dokka-c68c05a1e8876e9b8555df7bcdfeaca3e100f0d1.tar.bz2
dokka-c68c05a1e8876e9b8555df7bcdfeaca3e100f0d1.zip
Description list support for JavaDocs (#2213)
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/psi')
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt b/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt
index d74a1ca4..f9f591b2 100644
--- a/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt
@@ -14,17 +14,21 @@ import org.jetbrains.dokka.base.parsers.MarkdownParser
import org.jetbrains.dokka.base.translators.parseHtmlEncodedWithNormalisedSpaces
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.doc.*
+import org.jetbrains.dokka.model.doc.Deprecated
import org.jetbrains.dokka.utilities.DokkaLogger
import org.jetbrains.dokka.utilities.enumValueOrNull
+import org.jetbrains.dokka.utilities.htmlEscape
import org.jetbrains.kotlin.idea.kdoc.resolveKDocLink
import org.jetbrains.kotlin.idea.refactoring.fqName.getKotlinFqName
import org.jetbrains.kotlin.idea.util.CommentSaver.Companion.tokenType
import org.jetbrains.kotlin.psi.psiUtil.getNextSiblingIgnoringWhitespace
import org.jetbrains.kotlin.psi.psiUtil.siblings
import org.jsoup.Jsoup
-import org.jsoup.nodes.*
+import org.jsoup.nodes.Comment
+import org.jsoup.nodes.Element
+import org.jsoup.nodes.Node
+import org.jsoup.nodes.TextNode
import java.util.*
-import org.jetbrains.dokka.utilities.htmlEscape
interface JavaDocumentationParser {
fun parseDocumentation(element: PsiNamedElement): DocumentationNode
@@ -396,6 +400,9 @@ class JavadocParser(
"ul" -> ifChildrenPresent { Ul(children) }
"ol" -> ifChildrenPresent { Ol(children) }
"li" -> listOf(Li(children))
+ "dl" -> ifChildrenPresent { Dl(children) }
+ "dt" -> listOf(Dt(children))
+ "dd" -> listOf(Dd(children))
"a" -> listOf(createLink(element, children))
"table" -> ifChildrenPresent { Table(children) }
"tr" -> ifChildrenPresent { Tr(children) }