Support the start attribute for ordered lists

This commit is contained in:
SimonIT
2020-08-11 11:43:02 +02:00
parent 0dc281e6ea
commit ca98892953
2 changed files with 6 additions and 1 deletions

View File

@@ -181,7 +181,11 @@ class MarkdownConverter(object):
def convert_li(self, el, text):
parent = el.parent
if parent is not None and parent.name == 'ol':
bullet = '%s.' % (parent.index(el) + 1)
if parent.get("start"):
start = int(parent.get("start"))
else:
start = 1
bullet = '%s.' % (start + parent.index(el))
else:
depth = -1
while el: