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

Escaping and unescaping new line characters #143

Merged
merged 4 commits into from
Sep 20, 2022

Conversation

JamesBondski
Copy link
Contributor

As discussed in #139 , this adds the following:

  • \r and \n are always escaped when writing a file if found inside a key, value or comment.
  • adds a bool option "unescapeNewLines" (default is false to avoid breaking backwards compatibility) that will convert "\r" and "\n" to the respective characters.
  • Adds unit test cases for the above functionality.
  • Added testing of comments to IniKeyValueTest and restructured it to use a common function.

If you don't like the way I restructured the test cases, I can remove that, but it simplified the whole thing a lot in my opinion.

This is my first pull request on github so if I'm doing something wrong, just tell me. ;)

@aloneguid
Copy link
Owner

looks good to me, thank you!

@aloneguid aloneguid merged commit 395713c into aloneguid:master Sep 20, 2022
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.

2 participants