Steppschuh / Java-Markdown-Generator

Java library to generate markdown
MIT License
230 stars 47 forks source link

Use System.lineSeperator instead of "\n" for platform independence #7

Closed sandrozbinden closed 6 years ago

sandrozbinden commented 6 years ago

I got failing unit tests on windows platform as the current implementation use hardcoded "\n" new line for line seperation. It would be great to replace those with the platform indepentent System.lineSeperator in order to get "\n" for unix and "\r\n" for windows systems.

The following files would needed to be changed

java/net/steppschuh/markdowngenerator/list/UnorderedList.java java/net/steppschuh/markdowngenerator/table/Table.java java/net/steppschuh/markdowngenerator/text/code/CodeBlock.java java/net/steppschuh/markdowngenerator/text/heading/Heading.java java/net/steppschuh/markdowngenerator/text/quote/Quote.java java/net/steppschuh/markdowngenerator/text/HeadingTest.java

Steppschuh commented 6 years ago

Thanks for reporting, you're right. Please feel free to submit a PR, I won't be able to work on this in the next few days.

sandrozbinden commented 6 years ago

Hi @Steppschuh. Thanks for your reply. I created a new PR with the changes.