From b02b6a12e8a08fd7de389cf070291d53e01b33c5 Mon Sep 17 00:00:00 2001 From: Petr Bodnar Date: Thu, 24 Aug 2023 18:03:40 +0200 Subject: [PATCH] fix: make `mistletoe.HTMLRenderer` work again 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. --- mistletoe/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mistletoe/__init__.py b/mistletoe/__init__.py index 788966f..bc1a69e 100644 --- a/mistletoe/__init__.py +++ b/mistletoe/__init__.py @@ -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): """