From b78e3bb6c7d689bc1650088096461e687ee6441f Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 6 Feb 2015 16:41:39 +0100 Subject: handle code spans in markdown --- src/Kotlin/ContentBuilder.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Kotlin/ContentBuilder.kt b/src/Kotlin/ContentBuilder.kt index b5647ff0..80d49a85 100644 --- a/src/Kotlin/ContentBuilder.kt +++ b/src/Kotlin/ContentBuilder.kt @@ -49,11 +49,16 @@ public fun DocumentationBuilder.buildContentTo(tree: MarkdownNode, target: Conte processChildren() parent.append(nodeStack.pop()) } - MarkdownTokenTypes.CODE -> { + MarkdownElementTypes.CODE_SPAN -> { nodeStack.push(ContentCode()) processChildren() parent.append(nodeStack.pop()) } + MarkdownElementTypes.CODE_BLOCK -> { + nodeStack.push(ContentBlockCode()) + processChildren() + parent.append(nodeStack.pop()) + } MarkdownElementTypes.INLINE_LINK -> { val label = node.child(MarkdownElementTypes.LINK_TEXT)?.child(MarkdownTokenTypes.TEXT) val destination = node.child(MarkdownElementTypes.LINK_DESTINATION) -- cgit