Fix BeautifulSoup warning
This commit is contained in:
@@ -22,7 +22,7 @@ def highlight(html: str) -> str:
|
|||||||
if not code.parent.name == "pre":
|
if not code.parent.name == "pre":
|
||||||
continue
|
continue
|
||||||
lexer = guess_lexer(code.text)
|
lexer = guess_lexer(code.text)
|
||||||
tag = BeautifulSoup(phighlight(code.text, lexer, _FORMATTER)).body.next
|
tag = BeautifulSoup(phighlight(code.text, lexer, _FORMATTER), "html5lib").body.next
|
||||||
pre = code.parent
|
pre = code.parent
|
||||||
pre.replaceWith(tag)
|
pre.replaceWith(tag)
|
||||||
out = soup.body
|
out = soup.body
|
||||||
|
Reference in New Issue
Block a user