showdown icon indicating copy to clipboard operation
showdown copied to clipboard

makeMarkdown can't convert sublists

Open cork opened this issue 6 years ago • 2 comments

Converting html generated with showdown back to markdown breaks if there are sublists in the input.

var md = new showdown.Converter();
md.makeMarkdown(md.makeHtml('- parent\n    - child'));
md.makeMarkdown(md.makeHtml('1. parent\n    1. child'));

result:

- parent- child
1. parent1. child

expected result:

- parent
    - child
1. parent
    1. child

cork avatar Apr 09 '19 09:04 cork

Thank you for reporting this. We will fix it for version 2.0

tivie avatar Apr 17 '19 23:04 tivie

* a
  * b

is converted to:

<ul>
<li>a</li>
<li>b</li>
</ul>

by makeHtml in version 2.1.0.

I don't know whether it's the same bug as above.

Thanks for your great project!

Willie169 avatar Feb 01 '25 15:02 Willie169