From 8d5e09a1b983be7f82b5c583ab99392669efc3f7 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 15 Sep 2015 15:39:32 +0200 Subject: kotlin-for-upsource 0.13.1510; markdown library with ABI 0.25.0 --- src/Markdown/MarkdownProcessor.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/Markdown') diff --git a/src/Markdown/MarkdownProcessor.kt b/src/Markdown/MarkdownProcessor.kt index 13023a2c..62395bc1 100644 --- a/src/Markdown/MarkdownProcessor.kt +++ b/src/Markdown/MarkdownProcessor.kt @@ -1,9 +1,11 @@ package org.jetbrains.dokka -import org.intellij.markdown.* -import org.intellij.markdown.ast.* -import org.intellij.markdown.parser.* -import org.intellij.markdown.parser.dialects.commonmark.CommonMarkMarkerProcessor +import org.intellij.markdown.IElementType +import org.intellij.markdown.MarkdownElementTypes +import org.intellij.markdown.ast.ASTNode +import org.intellij.markdown.ast.LeafASTNode +import org.intellij.markdown.flavours.commonmark.CommonMarkFlavourDescriptor +import org.intellij.markdown.parser.MarkdownParser class MarkdownNode(val node: ASTNode, val parent: MarkdownNode?, val markdown: String) { val children: List = node.children.map { MarkdownNode(it, this, markdown) } @@ -44,5 +46,5 @@ private fun MarkdownNode.presentTo(sb: StringBuilder) { fun parseMarkdown(markdown: String): MarkdownNode { if (markdown.isEmpty()) return MarkdownNode(LeafASTNode(MarkdownElementTypes.MARKDOWN_FILE, 0, 0), null, markdown) - return MarkdownNode(MarkdownParser(CommonMarkMarkerProcessor.Factory).buildMarkdownTreeFromString(markdown), null, markdown) + return MarkdownNode(MarkdownParser(CommonMarkFlavourDescriptor()).buildMarkdownTreeFromString(markdown), null, markdown) } -- cgit