fixing import error

This commit is contained in:
2025-04-24 19:43:14 +02:00
parent d0323405c0
commit 14f6474cd5

View File

@ -33,7 +33,7 @@ def markdown2html(markdown, basepath, re_render, resources, viewport_width, font
"""
html = markdowner.convert(markdown)
soup = bs4.BeautifulSoup(html, "html.parser")
soup = bs4(html, "html.parser")
for img_element in soup.find_all("img"):
src = img_element["src"]
@ -79,7 +79,7 @@ def markdown2html(markdown, basepath, re_render, resources, viewport_width, font
.replace("\n", "<br />")
)
code_element.replace_with(bs4.BeautifulSoup(fixed_pre, "html.parser"))
code_element.replace_with(bs4(fixed_pre, "html.parser"))
# FIXME: highlight the code using Sublime's syntax