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

Sequence Mapping on Save ignore spaces #538

Closed
flowdopip opened this issue Oct 21, 2020 · 1 comment
Closed

Sequence Mapping on Save ignore spaces #538

flowdopip opened this issue Oct 21, 2020 · 1 comment

Comments

@flowdopip
Copy link

Example

I read the follow example
maintainers:

  • john.doe
  • john.smith
    and when i use YamlStream.Load and after that without changing anything i do a Stream.Save( , false) i get the following result:
    maintainers:
  • john.doe
  • john.smith

When i use the function save, the code removes the empty spaces.

@EdwardCooke
Copy link
Collaborator

When the YAML is deserialized (turned from YAML to an object) the whitespace (and comments) will be removed when re-serialized and will be formatted to the yaml spec. There is some options you can change to tweak the resulting output, however, there's nothing to keep the extra whitespace.

I'm also going to close this issue since it's almost 2 years old.

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

No branches or pull requests

2 participants