diff --git a/markdown2html.py b/markdown2html.py index 1195c15..ce046fa 100644 --- a/markdown2html.py +++ b/markdown2html.py @@ -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", "
") ) - 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