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

<p> and <br> are treated equally #52

Open
andrewnicols opened this issue Feb 22, 2016 · 1 comment
Open

<p> and <br> are treated equally #52

andrewnicols opened this issue Feb 22, 2016 · 1 comment

Comments

@andrewnicols
Copy link
Collaborator

@voku commented in the code change from #7 that there should be a difference between how <p> and <br> are displayed.

At the moment, the following text will be rendered:

<p>Some content</p><p>Here<br>And there</p>

As:


Some content

Here
And there

\nSome content\n\nHere\nAnd there\n

@voku is suggesting change <p> tags to render as "\n\n" . $content . "\n\n"
The above example then becomes:



Some content



Here
And there

\n\nSome content\n\n\n\nHere\nAnd there\n\n

Which, after normalisation of the newlines becomes:



Some content

Here
And there

\n\nSome content\n\nHere\nAnd there\n\n

The net result is the same in many situations, but will be different where the net element is not a paragraph (e.g. an H3, or a table).

@mtibben
Copy link
Owner

mtibben commented Feb 22, 2016

That sounds reasonable, if you can put together a PR I'll happily merge :)

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

No branches or pull requests

2 participants