diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-01-30 17:59:15 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-01-30 17:59:15 +0100 |
commit | bfd9ffd13ed6b6916790f5f0de5f9523db71b22e (patch) | |
tree | 214ae0ff76e8b35841947b639ce3c2022ad72fec /src/Markdown/MarkdownProcessor.kt | |
parent | b55b258574a01a02f906f5f12646ecacfc640e20 (diff) | |
download | dokka-bfd9ffd13ed6b6916790f5f0de5f9523db71b22e.tar.gz dokka-bfd9ffd13ed6b6916790f5f0de5f9523db71b22e.tar.bz2 dokka-bfd9ffd13ed6b6916790f5f0de5f9523db71b22e.zip |
load sections from KDoc PSI, not through Markdown extensions
Diffstat (limited to 'src/Markdown/MarkdownProcessor.kt')
-rw-r--r-- | src/Markdown/MarkdownProcessor.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Markdown/MarkdownProcessor.kt b/src/Markdown/MarkdownProcessor.kt index 05c4a7ec..7e601905 100644 --- a/src/Markdown/MarkdownProcessor.kt +++ b/src/Markdown/MarkdownProcessor.kt @@ -3,7 +3,7 @@ package org.jetbrains.dokka import org.intellij.markdown.* import org.intellij.markdown.ast.* import org.intellij.markdown.parser.* -import org.intellij.markdown.parser.dialects.KDocMarkerProcessor +import org.intellij.markdown.parser.dialects.commonmark.CommonMarkMarkerProcessor class MarkdownNode(val node: ASTNode, val parent: MarkdownNode?, val markdown: String) { val children: List<MarkdownNode> = node.children.map { MarkdownNode(it, this, markdown) } @@ -134,12 +134,12 @@ public fun MarkdownNode.toHtml(): String { fun parseMarkdown(markdown: String): MarkdownNode { if (markdown.isEmpty()) return MarkdownNode(LeafASTNode(MarkdownElementTypes.MARKDOWN_FILE, 0, 0), null, markdown) - return MarkdownNode(MarkdownParser(KDocMarkerProcessor.Factory()).buildMarkdownTreeFromString(markdown), null, markdown) + return MarkdownNode(MarkdownParser(CommonMarkMarkerProcessor.Factory()).buildMarkdownTreeFromString(markdown), null, markdown) } fun markdownToHtml(markdown: String): String { - val tree = MarkdownParser(KDocMarkerProcessor.Factory()).buildMarkdownTreeFromString(markdown) + val tree = MarkdownParser(CommonMarkMarkerProcessor.Factory()).buildMarkdownTreeFromString(markdown) val markdownTree = MarkdownNode(tree, null, markdown) val ast = markdownTree.toTestString() return markdownTree.toHtml() |