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

60 lines
557 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.
Here the thing to remember is that block level structure indications
take precedence over inline level structure indications:
```
% pandoc
Term
: Def
<!--
: comment def
-->
^D
<dl>
<dt>Term</dt>
<dd>
Def &lt;!
</dd>
<dd>
comment def &gt;
</dd>
</dl>
```
```
% pandoc
Term
: Def
test <!--
: comment def
and -->
^D
<dl>
<dt>Term</dt>
<dd>
Def test &lt;!
</dd>
<dd>
comment def and &gt;
</dd>
</dl>
```
```
% pandoc
Term
: Def
`code
: comment def
more code`
^D
<dl>
<dt>Term</dt>
<dd>
Def `code
</dd>
<dd>
comment def more code`
</dd>
</dl>
```