Experimental Markdown inside HTML support

This commit is contained in:
Govindas 2022-01-24 16:23:07 +02:00
parent 6507faf60b
commit 3f7e90fd46

View File

@ -36,7 +36,9 @@ def parseRawHTML(doc, line, htmlstring, rawhtml, id, maxlines):
#parse indented raw html #parse indented raw html
elif rawhtml: elif rawhtml:
if line.startswith(" "): if line.startswith(" "):
htmlstring = htmlstring + line.strip()
#experimental markdown inside HTML support
htmlstring = htmlstring + html.unescape(markdown.markdown(html.escape(line.strip())))
#if indented html was the last line, this is needed for it to not be ignored #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. #since this is the end of the file, we will not set rawhtml to False.