From b94ad5856d5ef394c65de2b96c7abea6cc022df4 Mon Sep 17 00:00:00 2001 From: Christian Morpurgo Date: Thu, 24 Apr 2025 19:46:39 +0200 Subject: [PATCH] fix import --- markdown2html.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/markdown2html.py b/markdown2html.py index ce046fa..c6f199a 100644 --- a/markdown2html.py +++ b/markdown2html.py @@ -12,6 +12,7 @@ import concurrent.futures import urllib.request import base64 from .lib.bs4 import BeautifulSoup as bs4 +from .lib.bs4.element import Comment from functools import partial @@ -61,7 +62,7 @@ def markdown2html(markdown, basepath, re_render, resources, viewport_width, font # remove comments, because they pollute the console with error messages for comment_element in soup.find_all( - text=lambda text: isinstance(text, bs4.Comment) + text=lambda text: isinstance(text, Comment) ): comment_element.extract()