Skip to content
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

Always indent top-level scalars with lines starting with document markers #162

Merged
merged 2 commits into from
May 2, 2020

Conversation

eemeli
Copy link
Owner

@eemeli eemeli commented Apr 27, 2020

This was noticed by @ingydotnet: Top-level scalars with content that includes document markers, i.e. lines starting with --- or ..., were not being indented. This is a problem, as the output would then be erroneously parsed.

This PR adds checks to the string stringifier for this particular case, and if necessary indents the content by two spaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant