diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/parsers/MarkdownParser.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/parsers/MarkdownParser.kt | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/base/src/main/kotlin/parsers/MarkdownParser.kt b/plugins/base/src/main/kotlin/parsers/MarkdownParser.kt index 23e59f8b..e7a36d3f 100644 --- a/plugins/base/src/main/kotlin/parsers/MarkdownParser.kt +++ b/plugins/base/src/main/kotlin/parsers/MarkdownParser.kt @@ -162,6 +162,12 @@ open class MarkdownParser( return linksHandler(linkText, link, linkTitle) } + private fun markdownFileHandler(node: ASTNode) = + DocTagsFromIElementFactory.getInstance( + node.type, + children = node.children.evaluateChildren() + ) + private fun autoLinksHandler(node: ASTNode): DocTag { val link = text.substring(node.startOffset + 1, node.endOffset - 1) @@ -206,11 +212,6 @@ open class MarkdownParser( body = text.substring(node.startOffset, node.endOffset).transform() ) - private fun markdownFileHandler(node: ASTNode) = if (node.children.size == 1) - visitNode(node.children.first()) - else - defaultHandler(node) - private fun strikeThroughHandler(node: ASTNode) = DocTagsFromIElementFactory.getInstance( node.type, children = node.children.evaluateChildrenWithDroppedEnclosingTokens(2) @@ -448,9 +449,9 @@ open class MarkdownParser( KDocKnownTag.SEE -> See( parseStringToDocNode(it.getContent()), it.getSubjectName().orEmpty(), - parseStringToDocNode("[${it.getSubjectName()}]") + (parseStringToDocNode("[${it.getSubjectName()}]")) .let { - val link = it.children[0] + val link = it.children[0].children[0] if (link is DocumentationLink) link.dri else null } |