You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you sure? In a |+, the "keep" chomping means that:
In this case, the final line break and any trailing empty lines are considered to be part of the scalar’s content. These additional lines are not subject to folding.
Then, because the value only contains white space:
If a block scalar consists only of empty lines, then these lines are considered as trailing lines and hence are affected by chomping.
And finally, as it's using literal style:
Inside literal scalars, all (indented) characters are considered to be content, including white space characters.
Or is there a definition I've missed or misunderstood that defines the number of spaces that should be considered to be a part of the indentation for an empty block scalar?
Verified in communication elsewhere that @ingydotnet was right; the indent level is determined by this:
8.1.1.1. Block Indentation Indicator
[...] If there is no non-empty line then the content indentation level is equal to the number of spaces on the longest line.
Describe the bug
Literal scalars with no non-empty lines produce wrong value sometimes
To Reproduce
Where
_
is a space.Expected behaviour
Should be
["\n\n\n"]
Versions (please complete the following information):
1.10.2 and master as seen here: https://spec.yaml.io/main/playground/parser
Browser as seen here https://spec.yaml.io/main/playground/parser
The text was updated successfully, but these errors were encountered: