Fix line after raw html not working
This commit is contained in:
parent
ba87ee895e
commit
bdb6422612
@ -2,3 +2,5 @@
|
||||
This is the homepage of our website.
|
||||
>
|
||||
<b>Hello</b>
|
||||
Another line
|
||||
Another line 2
|
||||
|
10
generate.py
10
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("<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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user