Open bwilkerson opened 1 year ago
FYI @kekavc24, I suppose we should investigate this.
I mean, if package:yaml_edit
produces folded strings correctly and package:yaml
parses them incorrectly, that'd probably cause some of our tests to fail :see_no_evil:
note to self: there is nice documentation of multi-line YAML strings at https://yaml-multiline.info/
I think this issue should be closed. package: yaml
does the right thing.
print(
loadYaml('''
>-
foo
bar
''',
),
); // Prints "foo bar"
print(
loadYaml('''
>-
foo
bar
''',
),
); // Prints "foo\nbar"
note to self: there is nice documentation of multi-line YAML strings at https://yaml-multiline.info/
@jonasfj Indeed. 😅 What actually fails are the indentation indicators. Maybe he included them? I thought we could use them for strings with leading spaces but encountered an error from package: yaml
for the fix in some cases. Had to fallback to double quotes.
When a block scalar using both folded and strip (
>-
) is processed, the newlines do not appear to be replaced by spaces. I haven't tested to see whether other forms of folded scalars are handled correctly.