-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Folded block scalars with whitespace at the end causes problems #86
Comments
This is probably going to be challenging, so I'm going to push it out compared to the other easy stuff I've got slated for v0.8.0 |
Realized I never wrote the explanation for why this hasn't been resolved yet. This is caused by the hack around the fact that |
@braydonk naive question, but does yaml.v3 still not retain plain line-break information if the newLineStr is "\r\n" instead of "\n"? |
I am pretty sure it will not, though I'd be pleasantly surprised to be wrong cause that would be a glimmer of hope. Been a while since the last time I looked at it, but the problem iirc is that the AST doesn't maintain empty newline information. So in the manner that yamlfmt operates, serialize the yaml document into the |
While investigating #84 I realized that the yaml library parses weirdly when there is whitespace at the end of lines in a folded block scalar.
When
scan_folded_as_literal: false
, you get the original bug shown in issue #84.When
scan_folded_as_literal: true
, you get the following with the same input:Will need to figure out why whitespace at the end of the line causes the library to think it's not printable.
The text was updated successfully, but these errors were encountered: