From 51390d738982e20267fd387ab356e995923951e6 Mon Sep 17 00:00:00 2001 From: microdnd Date: Sun, 23 Jun 2024 20:28:53 +0800 Subject: [PATCH] handle ol start value is not number (#127) Co-authored-by: Mico --- markdownify/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 2f71cad..cd66a39 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -326,7 +326,7 @@ class MarkdownConverter(object): 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