Fix line after raw html not working

This commit is contained in:
Govindas 2022-01-24 12:35:29 +02:00
parent ba87ee895e
commit bdb6422612
2 changed files with 7 additions and 5 deletions

View File

@ -2,3 +2,5 @@
This is the homepage of our website.
>
<b>Hello</b>
Another line
Another line 2

View File

@ -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("<a href='" + link + "'>" + title + "</a>"))
@ -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)