Skip to content

Commit

Permalink
Merge pull request agusmakmun#150 from rgammans/issue147fix
Browse files Browse the repository at this point in the history
Narrow exception caught to detect incompatible markdown version
  • Loading branch information
agusmakmun authored Mar 9, 2021
2 parents 0e6228a + 576bb9a commit b88a047
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion martor/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def markdownify(markdown_content):
extensions=MARTOR_MARKDOWN_EXTENSIONS,
extension_configs=MARTOR_MARKDOWN_EXTENSION_CONFIGS
)
except Exception:
except TypeError as e:
if 'extendMarkdown' not in str(e):
raise
raise VersionNotCompatible("The markdown isn't compatible, please reinstall "
"your python markdown into Markdown>=3.0")

Expand Down

0 comments on commit b88a047

Please sign in to comment.