mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
This revises the fix to #8150 (and the test case) and closes #9187. HTML in the (invalid) form: <ul> <li>L1</li> <ul> <li>L1.1</li> </ul> </ul> is treated by browsers like <ul> <li>L1 <ul> <li>L1.1</li> </ul> </li> </ul> not <ul> <li>L1 <li><ul> <li>L1.1</li> </ul> </li> </ul> as pandoc previously assumed. This change will give a similar treatment to <ul> <li>L1</li> <p>foobar</p> </ul> which also seems to match browser behavior.
56 lines
594 B
Markdown
56 lines
594 B
Markdown
Nested bullet lists
|
|
```
|
|
% pandoc -f html -t markdown
|
|
<ul>
|
|
<li>L1</li>
|
|
<li>L2</li>
|
|
<ul>
|
|
<li>L3.1</li>
|
|
<li>L3.2</li>
|
|
</ul>
|
|
<li>L4</li>
|
|
</ul>
|
|
^D
|
|
- L1
|
|
- L2
|
|
- L3.1
|
|
- L3.2
|
|
- L4
|
|
```
|
|
|
|
Nested ordered lists
|
|
```
|
|
% pandoc -f html -t markdown
|
|
<ol>
|
|
<li>L1</li>
|
|
<li>L2</li>
|
|
<ol>
|
|
<li>L3.1</li>
|
|
<li>L3.2</li>
|
|
</ol>
|
|
</ol>
|
|
^D
|
|
1. L1
|
|
2. L2
|
|
1. L3.1
|
|
2. L3.2
|
|
```
|
|
|
|
Ordered list nested below an unordered list
|
|
```
|
|
% pandoc -f html -t markdown
|
|
<ul>
|
|
<li>L1</li>
|
|
<li>L2</li>
|
|
<ol>
|
|
<li>L3.1</li>
|
|
<li>L3.2</li>
|
|
</ol>
|
|
</ul>
|
|
^D
|
|
- L1
|
|
- L2
|
|
1. L3.1
|
|
2. L3.2
|
|
```
|