Skip to content

Incorrect handling of line breaks #70

@philtre

Description

@philtre

In Markdown, paragraphs are separated by two line breaks. Two spaces at the end of a line produces a newline (or rather a <br /> tag in HTML)
For example (I've replaced spaces with • for clarity):

First•paragraph,•first•line.
First•paragraph,•still•first•line.

Second•paragraph,•first•line.••
Second•paragraph,•second•line.

The expected output is:

<p>First•paragraph,•first•line.
First•paragraph,•still•first•line.</p>

<p>Second•paragraph,•first•line.<br />
Second•paragraph,•second•line.</p>

The output produced by TSMarkdownParser is something more like:

<p>First•paragraph,•first•line.</p>
<p>First•paragraph,•still•first•line.</p>
<p></p>
<p>Second•paragraph,•first•line.</p>
<p>Second•paragraph,•second•line.</p>

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