diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-02-17 17:40:32 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-02-17 17:40:32 +0300 |
commit | 2ceff9c41cff42b7fb3ffe75ea36a7c570f3615b (patch) | |
tree | 4d0f1d9624b02e58f2d608674d3a466f2e1a3c58 /core/src/main/kotlin/Kotlin/ContentBuilder.kt | |
parent | 994a86700210fe5f26a8bc131815bde2f6269ac5 (diff) | |
download | dokka-2ceff9c41cff42b7fb3ffe75ea36a7c570f3615b.tar.gz dokka-2ceff9c41cff42b7fb3ffe75ea36a7c570f3615b.tar.bz2 dokka-2ceff9c41cff42b7fb3ffe75ea36a7c570f3615b.zip |
Fix for GH-136 GH-137 Blank lines inside code blocks are not preserved
Diffstat (limited to 'core/src/main/kotlin/Kotlin/ContentBuilder.kt')
-rw-r--r-- | core/src/main/kotlin/Kotlin/ContentBuilder.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Kotlin/ContentBuilder.kt b/core/src/main/kotlin/Kotlin/ContentBuilder.kt index 53afebaf..9c081d17 100644 --- a/core/src/main/kotlin/Kotlin/ContentBuilder.kt +++ b/core/src/main/kotlin/Kotlin/ContentBuilder.kt @@ -148,7 +148,7 @@ fun buildContentTo(tree: MarkdownNode, target: ContentBlock, linkResolver: (Stri private fun MarkdownNode.getLabelText() = children.filter { it.type == MarkdownTokenTypes.TEXT || it.type == MarkdownTokenTypes.EMPH }.joinToString("") { it.text } -private fun keepWhitespace(node: ContentNode) = node is ContentParagraph || node is ContentSection +private fun keepWhitespace(node: ContentNode) = node is ContentParagraph || node is ContentSection || node is ContentBlockCode fun buildInlineContentTo(tree: MarkdownNode, target: ContentBlock, linkResolver: (String) -> ContentBlock) { val inlineContent = tree.children.singleOrNull { it.type == MarkdownElementTypes.PARAGRAPH }?.children ?: listOf(tree) |