Fix text paragraph separation.
This commit is contained in:
parent
18ceb6bca5
commit
2b18c6a9b3
@ -299,14 +299,16 @@ def render_results_block(element, acc):
|
||||
|
||||
|
||||
def render_text(element, acc):
|
||||
acc.append('<span class="text">')
|
||||
acc.append('<div class="text">')
|
||||
render_text_tokens(element.content, acc)
|
||||
acc.append('</span>')
|
||||
acc.append('</div>')
|
||||
|
||||
def render_text_tokens(tokens, acc):
|
||||
acc.append('<p>')
|
||||
for chunk in tokens:
|
||||
if isinstance(chunk, str):
|
||||
acc.append('{}</span> '.format(chunk))
|
||||
lines = chunk.replace('\n\n', '</p><p>')
|
||||
acc.append('<span class="line">{}</span>'.format(lines))
|
||||
elif isinstance(chunk, Link):
|
||||
link_target = chunk.value
|
||||
if link_target.startswith('id:'):
|
||||
@ -321,6 +323,7 @@ def render_text_tokens(tokens, acc):
|
||||
))
|
||||
# else:
|
||||
# raise NotImplementedError('TextToken: {}'.format(chunk))
|
||||
acc.append('</p>')
|
||||
|
||||
|
||||
def render_tag(element, acc):
|
||||
|
@ -29,6 +29,12 @@ html, body {
|
||||
content: "🮦";
|
||||
}
|
||||
|
||||
/* Inhibit <p> tags inside items */
|
||||
/* TODO: Remove need for this on generator */
|
||||
.item p {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* Headers */
|
||||
h1 {
|
||||
font-size: 150%;
|
||||
|
Loading…
Reference in New Issue
Block a user