-
Notifications
You must be signed in to change notification settings - Fork 452
Closed
Description
Describe the bug
/** Rotates paths by `amount` **radians** around (`x`, `y`). */
rendered
Rotates paths by `amount`**radians** around (`x`, `y`).
Expected behaviour
Rotates paths by `amount` **radians** around (`x`, `y`).
To Reproduce
Actual bug is in KDoc parser, to reproduce - add test below in ParserTest.kt
Actually passes with Text(" ")
commented-out, while should with uncommented.
@Test
fun `Code and bold`() {
val kdoc = "Rotates paths by `amount` **radians** around (`x`, `y`)."
val expectedDocumentationNode = DocumentationNode(
listOf(
Description(
CustomDocTag(
listOf(
P(
listOf(
Text("Rotates paths by "),
CodeInline(listOf(Text("amount"))),
//Text(" "),
B(listOf(Text("radians"))),
Text(" around ("),
CodeInline(listOf(Text("x"))),
Text(", "),
CodeInline(listOf(Text("y"))),
Text(")."),
)
)
), name = MarkdownElementTypes.MARKDOWN_FILE.name
)
)
)
)
executeTest(kdoc, expectedDocumentationNode)
}
@Test
fun `Code with backticks`() {
val kdoc = "` `` ` ` ``` `"
val expectedDocumentationNode = DocumentationNode(
listOf(
Description(
CustomDocTag(
listOf(
P(
listOf(
CodeInline(listOf(Text("`` "))),
//Text(" "),
CodeInline(listOf(Text("``` "))),
)
)
), name = MarkdownElementTypes.MARKDOWN_FILE.name
)
)
)
)
executeTest(kdoc, expectedDocumentationNode)
}
Traced - space is removed in
private fun List<ASTNode>.mergeLeafASTNodes(): List<ASTNode> { |
On entry it is here, on exit - dropped.
Why?