Skip to content

Commit 576bb9a

Browse files
committed
Narrow exception caught to detect incompatible markdown version
Fixes #147
1 parent 2675461 commit 576bb9a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

martor/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ def markdownify(markdown_content):
3333
extensions=MARTOR_MARKDOWN_EXTENSIONS,
3434
extension_configs=MARTOR_MARKDOWN_EXTENSION_CONFIGS
3535
)
36-
except Exception:
36+
except TypeError as e:
37+
if 'extendMarkdown' not in str(e):
38+
raise
3739
raise VersionNotCompatible("The markdown isn't compatible, please reinstall "
3840
"your python markdown into Markdown>=3.0")
3941

0 commit comments

Comments
 (0)