Html2Markdown icon indicating copy to clipboard operation
Html2Markdown copied to clipboard

List indentation doesn't work

Open msander1983 opened this issue 4 years ago • 0 comments

The following HTML:

    <body>
        <ul>
            <li><a href=""A/Lorem.htm"">Level 1</a>
                <ul>
                    <li><a href=""A/Lorem.htm"">Level 2</a>
                    </li>
                    <li><a href=""A/Lorem.htm"">Level 2</a>
                    </li>
                    <li><a href=""A/Lorem.htm"">Level 2</a>
                        <ul>
                            <li><a href=""A/Lorem.htm"">Level 3</a></li>
                            <li><a href=""A/Lorem.htm"">Level 3</a></li>
                        </ul>
                    </li>
                    <li><a href=""A/Lorem.htm"">Level 2</a>
                    </li>
                    <li><a href=""A/Lorem.htm"">Level 2</a>
                    </li>
                </ul>
            </li>
        </ul>
    </body>

is converted to this Markdown text:

*   [Level 1](A/Lorem.htm)

    *   [Level 2](A/Lorem.htm)
    *   [Level 2](A/Lorem.htm)
    *   [Level 2](A/Lorem.htm)

    *   [Level 3](A/Lorem.htm)
    *   [Level 3](A/Lorem.htm)
    *   [Level 2](A/Lorem.htm)
    *   [Level 2](A/Lorem.htm)

I would expect the "Level 3" items to be indented, and there's also an unexpected empty line after items with a sub-list.

msander1983 avatar Nov 17 '20 12:11 msander1983