vmg / sundown

Standards compliant, fast, secure markdown processing library in C
1.99k stars 385 forks source link

Sundown requires a blank line before a block quote #92

Open finsprings opened 12 years ago

finsprings commented 12 years ago

The following two paragraphs both have a block quote after them, but the first has no blank line before the block quote. Neither Markdown.pl nor TextMate care but Sundown does not parse the first block quote as a block quote: it treats it as part of the paragraph.

Is there a reason that Sundown wants the blank line?

Input Text

A paragraph with a blockquote afterwards with no gap.
> Ohai I am a blockquote.

A paragraph with a blockquote afterwards with a one-line gap.

> Ohai I am another blockquote

Markdown.pl Output

<p>A paragraph with a blockquote afterwards with no gap.</p>

<blockquote>
  <p>Ohai I am a blockquote.</p>
</blockquote>

<p>A paragraph with a blockquote afterwards with a one-line gap.</p>

<blockquote>
  <p>Ohai I am another blockquote</p>
</blockquote>

Sundown Output

<p>A paragraph with a blockquote afterwards with no gap.
&gt; Ohai I am a blockquote.</p>

<p>A paragraph with a blockquote afterwards with a one-line gap.</p>

<blockquote>
<p>Ohai I am another blockquote</p>
</blockquote>
certik commented 11 years ago

Indeed, the same with "```" and other things. I noticed, that github used to have the same problem, but they fixed it somehow, but I can't see the fix in sundown.