mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Fix BeautifulSoup warning
This commit is contained in:
parent
5f9c6b8dad
commit
96121e57f3
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ def highlight(html: str) -> str:
|
|||
if not code.parent.name == "pre":
|
||||
continue
|
||||
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.replaceWith(tag)
|
||||
out = soup.body
|
||||
|
|
Loading…
Reference in a new issue