Files
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

648 B
Raw Permalink Blame History

% 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>