Fix raw HTML parsing & remove markdown inside HTML support due to issues

This commit is contained in:
Govindas 2022-02-17 17:28:55 +02:00
parent 7d6519c9ad
commit a6446b1aaf

View File

@ -99,16 +99,15 @@ def parseRawHTML(doc, line, htmlstring, rawhtml, id, maxlines):
elif rawhtml:
if line.startswith(" "):
#experimental markdown inside HTML support
htmlstring = htmlstring + html.unescape(markdown.markdown(html.escape(line.strip())))
htmlstring = htmlstring + line.strip()
#if indented html was the last line, this is needed for it to not be ignored
#since this is the end of the file, we will not set rawhtml to False.
if maxlines - id == 1:
doc.div(HTML(htmlstring))
doc = doc.div(HTML(htmlstring))
else:
rawhtml = False
doc.div(HTML(htmlstring))
doc = doc.div(HTML(htmlstring))
htmlstring = ""
return rawhtml, doc, htmlstring