Closed AlejandroBertolo closed 9 months ago
Hi @AlejandroBertolo ; thanks for the kind words and detailed report! Sorry to hear about your issue.
I've been able to replicate the issue with the following test in https://github.com/openrewrite/rewrite/blob/fab92f59e4b98786fffdcd0814ff39cd47bd5605/rewrite-yaml/src/test/java/org/openrewrite/yaml/format/IndentsTest.java#L28
@Test
@Issue("https://github.com/openrewrite/rewrite/issues/3531")
void multilineString() {
rewriteRun(
yaml("""
foo:
bar: >
A multiline string.
baz:
quz: Another string.
"""
)
);
}
Not yet sure what exactly causes the issue, or how to resolve, but it's a starting point if you're looking to help explore the issue and potential fix.
Hello. First of all, thanks for your work in this useful tool.
We have run into a rare formatting issue with the YAML Indents stock recipe. It seems to be related to the use of the > char. This specific case was with an openapi.yml file.
What version of OpenRewrite are you using?
How are you running OpenRewrite?
Through maven command in multimodule projects. Java17 and maven 3.8.4.
What is the smallest, simplest way to reproduce the problem?
The following yaml fragment is valid. But after applying Indents it no longer validates.
Non-validating outcome
diff
Thanks in advance.