Files
pandoc/test/command/9865.md
John MacFarlane 28eca1e41e Markdown reader: remove some misguided list fanciness.
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.
2025-03-14 15:07:16 -07:00

54 lines
648 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
````
% 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 &lt;!</p></li>
<li><p>b</p></li>
</ul>
<p>&gt; - c</p>
````