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

Folded style adds extra newlines #1021

Open
lanwin opened this issue Dec 6, 2024 · 0 comments
Open

Folded style adds extra newlines #1021

lanwin opened this issue Dec 6, 2024 · 0 comments

Comments

@lanwin
Copy link

lanwin commented Dec 6, 2024

Describe the bug
I noticed that YamlDotNet 16.2.0 adds extra newlines when writing a foleded string.

To Reproduce

var yaml = new SerializerBuilder().WithDefaultScalarStyle(ScalarStyle.Folded).Build();
var result = yaml.Serialize(new {Test="""
                                         <section>test</section>
                                         <section>test</section>
                                         <section>test</section>
                                         """});

Current output

Test: >-
  <section>test</section>

  <section>test</section>

  <section>test</section>

Expected output

Test: >-
  <section>test</section>
  <section>test</section>
  <section>test</section>
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

1 participant