Skip to content

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

@andrewnicols

Description

@andrewnicols

@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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions