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

[Question] TextWriter.NewLine is hard-coded to '\n' even when running on Windows #211

Closed
augustoproiete opened this issue Feb 20, 2018 · 3 comments

Comments

@augustoproiete
Copy link
Contributor

augustoproiete commented Feb 20, 2018

Hello!

Quick question: Is there a reason to always uses \n for line-breaks instead of Environment.NewLine, or is just preference?

Markdown files will typically contain fragments of content that - after being converted to HTML - are likely added as content to an HTML template (which itself has line-breaks), which can cause mixed line-endings if the HTML template uses \r\n.

@Kryptos-FR
Copy link
Contributor

This should probably be an option (with a decent default value, like Environment.NewLine) so as to accommodate all scenarios.

@augustoproiete
Copy link
Contributor Author

@Kryptos-FR I agree that this should be configurable. I've submitted PR #214 to address that.

I'm curious on why Environment.NewLine is not the default, though...

@xoofx
Copy link
Owner

xoofx commented Apr 4, 2018

Thanks, PR #214 is merged, will publish a new package soon

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

No branches or pull requests

3 participants