evilstreak / markdown-js

A Markdown parser for javascript
7.69k stars 863 forks source link

<iframe> tags should not be wrapped in <p> tags #212

Open toddself opened 9 years ago

toddself commented 9 years ago

Given the following input:

this is a **paragraph**

<iframe src="http://example.com"></iframe>

markdown (along with stmd - see jgm/stmd#88) outputs:

<p>this is a <strong>paragraph</strong></p>

<p><iframe src="http://example.com"></iframe></p>

Gruber, (and chjj/marked) on the other hand presents:

<p>this is a <strong>paragraph</strong>

<iframe src="http://example.com"></iframe>

Wrapping <iframe> tags in extraneous <p> tags can cause massive issues with styling of content.

I think Gruber has it right here, even though both are Valid HTML5

kevin14 commented 9 years ago

@toddself yeah i have the same problem that while i use some html syntax in markdown , they were all wrapped in

.