Closed setcy closed 1 year ago
Hi @jonasfj, thanks for the review!
I have pushed a new commit that updates the comment and improves the code by using .split('\n')
.
Maybe this is a separate issue, but might also be worth considering if we should address it here.
Are there strings that cannot be written as folded string?
Playing around I had a hard time writing
T
or\n T
For these conditions, we can use block styles with indication indicators to implement it.
input: hello
output:
>-3
hello
input: \n hello
output:
>-3
hello
input: \n \n hello \n
output:
>-3
hello
note: Some yaml conversion tools could not correctly parse condition 3, they parsed the output as \n\n hello
fixes: #41
Test data:
input:
hello \n world
output:input:
hello \n\n world
output:input:
hello \n \n world
output:input:
hello \nstring\n world
output: