Skip to content

Commit

Permalink
handle ol start value is not number (#127)
Browse files Browse the repository at this point in the history
Co-authored-by: Mico <mico_wu@trendmicro.com>
  • Loading branch information
microdnd and Mico authored Jun 23, 2024
1 parent 50b4640 commit 51390d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion markdownify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def convert_list(self, el, text, convert_as_inline):
def convert_li(self, el, text, convert_as_inline):
parent = el.parent
if parent is not None and parent.name == 'ol':
if parent.get("start"):
if parent.get("start") and str(parent.get("start")).isnumeric():
start = int(parent.get("start"))
else:
start = 1
Expand Down

0 comments on commit 51390d7

Please sign in to comment.