mdiep / MMMarkdown

An Objective-C framework for converting Markdown to HTML.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why is a new line character inserted after a <br /> tag in the HTML output

SerenadeX opened this issue · comments

I'm looking at this line in particular. Why would we want to include a '\n' character in the HTML if we have already put in a <br /> tag? '\n' characters do not render in HTML.

I would open a PR removing this but I want to make sure that I understand the design of this before I start ripping things out.

It makes the HTML marginally better to read. As you noted, \n characters do not render in HTML.

Would it make sense then to have an option to not insert those characters? In other words get all the HTML on one line?

No, I think you should use a minifier if you're interested in that sort of behavior.