From bdb642261202ae06f146f0dd63db6fa1ffc7e1b8 Mon Sep 17 00:00:00 2001 From: Govindas Date: Mon, 24 Jan 2022 12:35:29 +0200 Subject: [PATCH] Fix line after raw html not working --- Home.page | 2 ++ generate.py | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Home.page b/Home.page index 9d98ab8..dbb9839 100644 --- a/Home.page +++ b/Home.page @@ -2,3 +2,5 @@ This is the homepage of our website. > Hello +Another line +Another line 2 diff --git a/generate.py b/generate.py index fb13ec4..632d476 100644 --- a/generate.py +++ b/generate.py @@ -22,6 +22,7 @@ def generateNavigationBar(lines): global navbar navbar = E for line in lines: + title, link = line.strip().split(";", 1) navbar = navbar.li(HTML("" + title + "")) @@ -42,17 +43,16 @@ def generateLines(title, lines): html = html + line.strip() else: rawhtml = False - doc(HTML(html)) + doc.div(HTML(html)) #parse markdown - else: - md = markdown.markdown(line.strip()) - doc(HTML(md)) + if rawhtml == False: + doc(HTML( markdown.markdown(line.strip()) )) #if indented html was the last line, this is needed for it to not be ignored if rawhtml == True: rawhtml = False - doc(HTML(html)) + doc.div(HTML(html)) generatePage(title, doc)