Thanks to visit codestin.com
Credit goes to github.com

Skip to content

html reader: does not support common usage of nested lists #8150

@hstock

Description

@hstock

I don't know, if both these styles of using nested lists in HTML are conforming to spec, however both styles are common.

This style is used for example in mails generated by Thunderbird and does not render correctly in pandoc:

<!-- file: nested-list1.html -->
<ul>
	<li>L1</li>
	<li>L2</li>
	<ul>
		<li>L3.1</li>
		<li>L3.2</li>
	</ul>
</ul>
~$ cat nested-list1.html | pandoc -f html -t markdown
L1

L2

-   L3.1
-   L3.2

This style works well with pandoc:

<!-- file: nested-list2.html -->
<ul>
	<li>L1</li>
	<li>L2
	<ul>
		<li>L3.1</li>
		<li>L3.2</li>
	</ul></li>
</ul>
$ cat nested-list2.html | pandoc -f html -t markdown
-   L1
-   L2
    -   L3.1
    -   L3.2

It would be nice, if pandoc could render both styles as intended. (The expectation would be, to have both styles render the same in markdown output and other writers.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions