2

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/

Community
  • 1
  • 1
HelpingHand
  • 1,045
  • 11
  • 26

1 Answers1

1

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

Emanuil Rusev
  • 34,563
  • 55
  • 137
  • 201
  • Um... Didn't you create parsedown-extra? I just looked and it seems that its been reported already. I added a comment to the issues thread. For now, what should I do for newlines? – HelpingHand Nov 19 '14 at 14:57
  • @HelpingHand, I just updated Parsedown. The update should resolve your issue. – Emanuil Rusev Nov 19 '14 at 18:27
  • I just used it... and... it still isn't working... Has the method of implementation changed at all? – HelpingHand Nov 20 '14 at 02:33
  • @HelpingHand, You need to update both `Parsedown.php` and `ParsedownExtra.php`. – Emanuil Rusev Nov 20 '14 at 02:36
  • Yup... It worked! I was going batty restarting my entire system just to see if it was something that I was doing. Thank you for the help! Great piece of software. – HelpingHand Nov 20 '14 at 02:51
  • @HelpingHand, You are welcome. I saw that you started a wiki about Parsedown Extra. I appreciate that. – Emanuil Rusev Nov 20 '14 at 03:31
  • No problem... I felt that the existing documentation on markdown language was a little complicated for the average web user. Its definitely a work in progress. Thanks for the script that makes it all happen! :) – HelpingHand Nov 21 '14 at 16:15