minor improvement in handling html titles

This commit is contained in:
Lionel Dricot 2022-02-04 13:38:33 +01:00
parent c985f1e8b4
commit 1cb3f48845
1 changed files with 1 additions and 1 deletions

View File

@ -353,7 +353,7 @@ class HtmlRenderer():
for child in element.children:
rendered_body += recursive_render(child,indent=indent)
elif element.name in ["h1","h2","h3","h4","h5","h6"]:
line = element.get_text()
line = sanitize_string(element.get_text())
if element.name in ["h1","h2"]:
rendered_body += "\n"+"\x1b[1;34m\x1b[4m" + line + "\x1b[0m"+"\n"
elif element.name in ["h3","h4"]: