enhancement/implement_tooltips_for_xpath3 (#242)

Co-authored-by: widlam <mikolaj.widla@gmail.com>
Reviewed-on: #242
This commit is contained in:
2023-08-21 14:15:07 +02:00
parent 6319d7c427
commit a78f3bd52b
9 changed files with 9194 additions and 2749 deletions

View File

@@ -8,7 +8,7 @@ def convertHTML(source: str, sourceFrom: str):
if sourceFrom == "xml":
xmldoc = etree.parse(BytesIO(source.encode("utf-8")), xmlParser)
return html.tostring(xmldoc, method="html", pretty_print=True).decode()
return html.tostring(xmldoc, method="html", pretty_print=True, doctype="<!DOCTYPE html>").decode()
elif sourceFrom == "html":
htmldoc = html.parse(BytesIO(source.encode("utf-8")), htmlParser)
return etree.tostring(htmldoc, method="xml", pretty_print=True, doctype="", xml_declaration=True, encoding="utf-8").decode()