mirror of
https://github.com/jgm/pandoc.git
synced 2026-07-10 19:37:12 +00:00
28eca1e41e
Previously we tried to handle things like commented out list
items:
- one
<!--
- two
-->
- three
and also things like:
- one `and
- two` and
But the code we added to handle these cases caused problems with
other, more straightforward things, like:
- one
- ```
code
```
- three
So we are rolling back all the fanciness, so that the markdown
parser now behaves more like the commonmark parser, in which
indicators of block-level structure always take priority over
indicators of inline structure.
Closes #9865. Closes #7778. See also #5628.
648 B
648 B
% pandoc
- example 1
- ```
one
two
```
- list item three
^D
<ul>
<li>example 1</li>
<li><pre><code>one
two</code></pre></li>
<li>list item three</li>
</ul>
% pandoc
- example 3
- ```
one
two
```
- list item three
^D
<ul>
<li>example 3</li>
<li><pre><code>one
two</code></pre></li>
<li>list item three</li>
</ul>
Here is a case that we used to handle differently, but #9865 aligns pandoc's markdown parser with commonmark in letting block level structure take precedence over inline level structure.
% pandoc
- a <!--
- b
-->
- c
^D
<ul>
<li><p>a <!–</p></li>
<li><p>b</p></li>
</ul>
<p>–> - c</p>