Skip to content

Commit

Permalink
Update to Mistune v3 (#1820)
Browse files Browse the repository at this point in the history
  • Loading branch information
TiagodePAlves committed Jun 16, 2023
1 parent 0a53820 commit 60af6d8
Show file tree
Hide file tree
Showing 3 changed files with 332 additions and 161 deletions.
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

0 comments on commit 60af6d8

Please sign in to comment.