Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blockquote termination edge-case #60

Closed
rlidwka opened this issue Jul 16, 2015 · 1 comment
Closed

Blockquote termination edge-case #60

rlidwka opened this issue Jul 16, 2015 · 1 comment

Comments

@rlidwka
Copy link
Contributor

rlidwka commented Jul 16, 2015

The spec says, “An indented code block cannot interrupt a paragraph.”

So this looks right:

$ echo -e '> 111\n    222' | ./commonmark-0.20 
<blockquote>
<p>111
222</p>
</blockquote>

But a list can:

$ echo -e '> 111\n - 222' | ./commonmark-0.20 
<blockquote>
<p>111</p>
</blockquote>
<ul>
<li>222</li>
</ul>

The trouble comes when the thing after the blockquote looks like this:

> 111
    - 222
$ echo -e '> 111\n    - 222' | ./commonmark-0.20 
<blockquote>
<p>111</p>
</blockquote>
<pre><code>- 222
</code></pre>

It terminates a blockquote saying “hey, I'm a list”, but is parsed as a code block afterwards.

Imho, it should be parsed like a paragraph continuation after all:

<blockquote>
<p>111
- 222</p>
</blockquote>
@jgm
Copy link
Member

jgm commented Jul 16, 2015

This is a commonmark.js bug. Note that, again, cmark parses this correctly.
Probably worth adding an example like this in the spec.

jgm added a commit to commonmark/commonmark-spec that referenced this issue Jul 26, 2015
@jgm jgm closed this as completed in f83a793 Jul 26, 2015
xxgreg pushed a commit to xxgreg/commonmark.js that referenced this issue Sep 14, 2015
zudov added a commit to zudov/haskell-comark that referenced this issue Aug 8, 2016
Relevant entry of the changelog:

> [0.22]
>
>   * Added test case clarifying laziness in block quotes (see commonmark/commonmark.js#60).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants