From a6446b1aaf818a056e271609af1219402da9758a Mon Sep 17 00:00:00 2001 From: Govindas Date: Thu, 17 Feb 2022 17:28:55 +0200 Subject: [PATCH] Fix raw HTML parsing & remove markdown inside HTML support due to issues --- gsitegen/generate.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gsitegen/generate.py b/gsitegen/generate.py index 06b33d8..38b924e 100644 --- a/gsitegen/generate.py +++ b/gsitegen/generate.py @@ -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