aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/parsers
diff options
context:
space:
mode:
authorVadim Mishenev <vad-mishenev@yandex.ru>2022-09-26 16:33:24 +0300
committerGitHub <noreply@github.com>2022-09-26 16:33:24 +0300
commita816e917995858129ad074409f73e99d3b100318 (patch)
tree746bbe15a2055642179c2aa9ab4e3580c9cf95bb /plugins/base/src/main/kotlin/parsers
parenta0250a5d8188fd539ffe516f7c49ce0eed1d3ded (diff)
downloaddokka-a816e917995858129ad074409f73e99d3b100318.tar.gz
dokka-a816e917995858129ad074409f73e99d3b100318.tar.bz2
dokka-a816e917995858129ad074409f73e99d3b100318.zip
Trim four spaces inside indented code block (#2661)
* Trim four spaces inside indented code block * Fix test
Diffstat (limited to 'plugins/base/src/main/kotlin/parsers')
-rw-r--r--plugins/base/src/main/kotlin/parsers/MarkdownParser.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/base/src/main/kotlin/parsers/MarkdownParser.kt b/plugins/base/src/main/kotlin/parsers/MarkdownParser.kt
index 2e301f1e..a1648b16 100644
--- a/plugins/base/src/main/kotlin/parsers/MarkdownParser.kt
+++ b/plugins/base/src/main/kotlin/parsers/MarkdownParser.kt
@@ -10,6 +10,7 @@ import org.intellij.markdown.ast.impl.ListItemCompositeNode
import org.intellij.markdown.flavours.gfm.GFMElementTypes
import org.intellij.markdown.flavours.gfm.GFMFlavourDescriptor
import org.intellij.markdown.flavours.gfm.GFMTokenTypes
+import org.intellij.markdown.html.HtmlGenerator
import org.jetbrains.dokka.base.parsers.factories.DocTagsFromIElementFactory
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.links.PointingToDeclaration
@@ -343,7 +344,7 @@ open class MarkdownParser(
DocTagsFromIElementFactory.getInstance(node.type, children = node.children.mergeLeafASTNodes().flatMap {
DocTagsFromIElementFactory.getInstance(
MarkdownTokenTypes.TEXT,
- body = text.substring(it.startOffset, it.endOffset)
+ body = HtmlGenerator.trimIndents(text.substring(it.startOffset, it.endOffset), 4).toString()
)
})