Skip to content

Commit

Permalink
fix: make mistletoe.HTMLRenderer work again
Browse files Browse the repository at this point in the history
Backwards compatibility was actually broken in #182 inadvertently -
it didn't cover the case when the old `HTMLRenderer` was imported directly
from the `mistletoe` package.

Note: The `# noqa: F401` comment is for the flake8 linter, it suppresses
the `imported but unused` rule.
  • Loading branch information
pbodnar committed Aug 24, 2023
1 parent 45f5c61 commit b02b6a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mistletoe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

from mistletoe.block_token import Document
from mistletoe.html_renderer import HtmlRenderer
# import the old name for backwards compatibility:
from mistletoe.html_renderer import HTMLRenderer # noqa: F401


def markdown(iterable, renderer=HtmlRenderer):
"""
Expand Down

0 comments on commit b02b6a1

Please sign in to comment.