aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-07-06 14:13:29 +0200
committerDmitry Jemerov <yole@jetbrains.com>2016-07-06 14:13:29 +0200
commitb5367f295be47f2f6ad26f113d80362102b6c36d (patch)
tree0b31472c3c7222b414da3f9ff4a2b9ad5f2313dd /core/src/main/kotlin
parentc0064d2b43ec30237d0d39bf5a9aaa4ce5e14744 (diff)
downloaddokka-b5367f295be47f2f6ad26f113d80362102b6c36d.tar.gz
dokka-b5367f295be47f2f6ad26f113d80362102b6c36d.tar.bz2
dokka-b5367f295be47f2f6ad26f113d80362102b6c36d.zip
don't lose exclamation marks in code blocks (KT-13000)
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r--core/src/main/kotlin/Kotlin/ContentBuilder.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Kotlin/ContentBuilder.kt b/core/src/main/kotlin/Kotlin/ContentBuilder.kt
index 9e89a20a..c16b19c5 100644
--- a/core/src/main/kotlin/Kotlin/ContentBuilder.kt
+++ b/core/src/main/kotlin/Kotlin/ContentBuilder.kt
@@ -42,7 +42,9 @@ fun buildContentTo(tree: MarkdownNode, target: ContentBlock, linkResolver: (Stri
MarkdownElementTypes.LIST_ITEM -> appendNodeWithChildren(ContentListItem())
MarkdownElementTypes.EMPH -> appendNodeWithChildren(ContentEmphasis())
MarkdownElementTypes.STRONG -> appendNodeWithChildren(ContentStrong())
- MarkdownElementTypes.CODE_SPAN -> appendNodeWithChildren(ContentCode())
+ MarkdownElementTypes.CODE_SPAN -> {
+ appendNodeWithChildren(ContentCode())
+ }
MarkdownElementTypes.CODE_BLOCK,
MarkdownElementTypes.CODE_FENCE -> appendNodeWithChildren(ContentBlockCode())
MarkdownElementTypes.PARAGRAPH -> appendNodeWithChildren(ContentParagraph())
@@ -123,6 +125,7 @@ fun buildContentTo(tree: MarkdownNode, target: ContentBlock, linkResolver: (Stri
MarkdownTokenTypes.RPAREN,
MarkdownTokenTypes.LBRACKET,
MarkdownTokenTypes.RBRACKET,
+ MarkdownTokenTypes.EXCLAMATION_MARK,
MarkdownTokenTypes.CODE_FENCE_CONTENT -> {
parent.append(ContentText(node.text))
}