mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-29 01:41:20 +08: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.
60 lines
557 B
Markdown
60 lines
557 B
Markdown
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 <!–
|
||
</dd>
|
||
<dd>
|
||
comment def –>
|
||
</dd>
|
||
</dl>
|
||
```
|
||
|
||
```
|
||
% pandoc
|
||
Term
|
||
: Def
|
||
test <!--
|
||
: comment def
|
||
and -->
|
||
^D
|
||
<dl>
|
||
<dt>Term</dt>
|
||
<dd>
|
||
Def test <!–
|
||
</dd>
|
||
<dd>
|
||
comment def and –>
|
||
</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>
|
||
```
|