paragraphs inside div with parsedown

2019-08-09 06:05发布

问题:

How do I create paragraphs inside a <div markdown="1"> using Parsedown?

For instance, look at the following code.

Input

<div markdown="1">
Lorem ipsum, blah blah blah...\n

Another Lorem ipsum, blah blah blah...
</div>

Output

<div>
<p>
Lorem ipsum, blah blah blah...\n

Another Lorem ipsum, blah blah blah...
</p>
</div>

Why is markdown-extra creating one large <p> for the entire contents of the div?

How do I create newlines since this does not work?

Possible duplicate: Kirby: MarkdownExtra doesn't produce wanted paragraphes, renders line-breaks instead

Useful tester: http://parsedown.org/extra/

回答1:

This looks like an issue with the parser. You should report it at https://github.com/erusev/parsedown-extra/issues.