fixing import error
This commit is contained in:
@ -33,7 +33,7 @@ def markdown2html(markdown, basepath, re_render, resources, viewport_width, font
|
|||||||
"""
|
"""
|
||||||
html = markdowner.convert(markdown)
|
html = markdowner.convert(markdown)
|
||||||
|
|
||||||
soup = bs4.BeautifulSoup(html, "html.parser")
|
soup = bs4(html, "html.parser")
|
||||||
for img_element in soup.find_all("img"):
|
for img_element in soup.find_all("img"):
|
||||||
src = img_element["src"]
|
src = img_element["src"]
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ def markdown2html(markdown, basepath, re_render, resources, viewport_width, font
|
|||||||
.replace("\n", "<br />")
|
.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
|
# FIXME: highlight the code using Sublime's syntax
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user