Skip to content

Commit b88a047

Browse files
authored
Merge pull request #150 from rgammans/issue147fix
Narrow exception caught to detect incompatible markdown version
2 parents 0e6228a + 576bb9a commit b88a047

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)