Nested list in markdown cannot convert to rst correctly
flynxea opened this issue · 1 comments
flynxea commented
* abc
- 123
- 456
* def
should show as:
- abc
- 123
- 456
- def
But with the code:
def md2rst(lines):
m = '\n'.join(lines)
parser = commonmark.Parser()
ast = parser.parse(m)
renderer = commonmark.ReStructuredTextRenderer()
rst = renderer.render(ast)
lines[:] = rst.splitlines()it cannot output the correct rst string.
Toliak commented
