erusev / parsedown

Better Markdown Parser in PHP
https://parsedown.org
MIT License
14.69k stars 1.12k forks source link

Links inside a p-tag does not work #739

Closed jenstornell closed 4 years ago

jenstornell commented 4 years ago

A link tag does not work when it's inside a html <p> tag.

I was discovering this when I went from converting html to yaml and don't wanted to spend more time than needed. Therefor I kept the p-tags but changed the link syntax. However, this combination does not work. Is it expected behavior?

This does work

Oat cake sugar plum cupcake powder jelly beans topping apple pie topping halvah. Tootsie roll candy canes danish bear claw caramels marshmallow croissant. Macaroon tiramisu brownie jujubes ice cream marshmallow tootsie roll. [A link](a/link).

This does not work

<p>Oat cake sugar plum cupcake powder jelly beans topping apple pie topping halvah. Tootsie roll candy canes danish bear claw caramels marshmallow croissant. Macaroon tiramisu brownie jujubes ice cream marshmallow tootsie roll. [A link](a/link).</p>
taufik-nurrohman commented 4 years ago
<p markdown="1"> … </p>
Linnzh commented 4 years ago

Yes, I have also encountered this situation. Also in the

tag, text bold (**) does not work.

Linnzh commented 4 years ago

@jenstornell , The strict markdown syntax does not seem to support nesting in HTML code. This library will skip the HTML code part.

jenstornell commented 4 years ago

markdown="1" solved it so I close this one now.