rewrite
rewrite copied to clipboard
MergeYamlVisitor - inline comments not taken into account
Hi,
the MergeYamlVisitor does not take inline comments into account at merging YAMLs. See the test:
@Test
fun existingEntryBlockWithComment() = assertChanged(
recipe = MergeYaml(
"$",
"""
spring:
application:
description: a description
""".trimIndent(),
false,
null
),
before = """
spring:
application:
name: main #Some comment
""",
after = """
spring:
application:
name: main #Some comment
description: a description
"""
)
The actual result is:
spring:
application:
name: main
description: a description #Some comment
Thanks and kind regards Thomas