Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Mistune v3 #1820

Merged
merged 9 commits into from
Jun 16, 2023
7 changes: 4 additions & 3 deletions nbconvert/filters/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

try:
from .markdown_mistune import markdown2html_mistune

except ImportError as e:
# store in variable for Python 3
_mistune_import_error = e

def markdown2html_mistune(source):
def markdown2html_mistune(source: str) -> str:
"""mistune is unavailable, raise ImportError"""
raise ImportError("markdown2html requires mistune: %s" % _mistune_import_error)
msg = f"markdown2html requires mistune: {_mistune_import_error}"
raise ImportError(msg)


from .pandoc import convert_pandoc
Expand Down