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. This is the homepage of our website.
> >
<b>Hello</b> <b>Hello</b>
Another line
Another line 2

View File

@ -22,6 +22,7 @@ def generateNavigationBar(lines):
global navbar global navbar
navbar = E navbar = E
for line in lines: for line in lines:
title, link = line.strip().split(";", 1) title, link = line.strip().split(";", 1)
navbar = navbar.li(HTML("<a href='" + link + "'>" + title + "</a>")) navbar = navbar.li(HTML("<a href='" + link + "'>" + title + "</a>"))
@ -42,17 +43,16 @@ def generateLines(title, lines):
html = html + line.strip() html = html + line.strip()
else: else:
rawhtml = False rawhtml = False
doc(HTML(html)) doc.div(HTML(html))
#parse markdown #parse markdown
else: if rawhtml == False:
md = markdown.markdown(line.strip()) doc(HTML( markdown.markdown(line.strip()) ))
doc(HTML(md))
#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
if rawhtml == True: if rawhtml == True:
rawhtml = False rawhtml = False
doc(HTML(html)) doc.div(HTML(html))
generatePage(title, doc) generatePage(title, doc)