fix import
This commit is contained in:
@ -12,6 +12,7 @@ import concurrent.futures
|
|||||||
import urllib.request
|
import urllib.request
|
||||||
import base64
|
import base64
|
||||||
from .lib.bs4 import BeautifulSoup as bs4
|
from .lib.bs4 import BeautifulSoup as bs4
|
||||||
|
from .lib.bs4.element import Comment
|
||||||
|
|
||||||
from functools import partial
|
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
|
# remove comments, because they pollute the console with error messages
|
||||||
for comment_element in soup.find_all(
|
for comment_element in soup.find_all(
|
||||||
text=lambda text: isinstance(text, bs4.Comment)
|
text=lambda text: isinstance(text, Comment)
|
||||||
):
|
):
|
||||||
comment_element.extract()
|
comment_element.extract()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user