-
-
Notifications
You must be signed in to change notification settings - Fork 497
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
Serializing string with newlines adds extra lines #246
Comments
I'm not sure if I'm seeing the same issue here but in reverse with deserialization as well. I'm trying to load in some text from a document section like this:
However, when I deserialize this the value only contains one newline where the blank line is instead of one at the end of each line.
|
Adding the following attribute to your property solves this issue.
|
I'm sorry I was unable to answer this question in a timely fashion. As you have certainly moved on to other things, I will close this issue, but feel free to reopen it if necessary. |
YamlDotNet appears to double the end-of-line markers.
For example:
outputs the following:
Internally, when I inspect the
yaml
variable, the text includesData: >-\r\n 123\r\n\r\n 456\r\n
. So it is indeed adding an extra line.Whereas I would expect it to be:
and internally
Data: >-\r\n 123\r\n 456\r\n
.The text was updated successfully, but these errors were encountered: