Detect bulleted lists and set margin-bottom to 0.
This commit is contained in:
parent
cb3ae7d3a9
commit
9084dba5c1
|
@ -14,3 +14,7 @@ html, body {
|
|||
.btn {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.margin-bottom-zero {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
|
@ -66,11 +66,11 @@
|
|||
<p>Revision as of {{ version.modified.strftime('%H:%M, %d %B %Y') }}</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="card mb-2" id="text">
|
||||
<div class="card mb-2 px-2" id="text">
|
||||
<div class="card-block">
|
||||
{% if span_length %}
|
||||
{%- for start, line in add_highlight(text, span_start, span_length) if line -%}
|
||||
<p class="card-text" data-start="{{ start }}">
|
||||
<p class="card-text{% if line.0.text.startswith('-') %} margin-bottom-zero{% endif %}" data-start="{{ start }}">
|
||||
{% for i in line %}
|
||||
{%- if i.highlight -%}
|
||||
{%- if i.highlight != '\n' and i.highlight != '\r\n' -%}
|
||||
|
@ -86,7 +86,7 @@
|
|||
{%- for start, line in iter_lines(text) if line != '\r\n' -%}
|
||||
{# <p data-start="{{ start }}">{% if line != "\n" and line != "\r\n" %}{{ line }}{% else %} {% endif
|
||||
%}</p>#}
|
||||
<p data-start="{{ start }}">{{ nbsp_at_start(line) }}</p>
|
||||
<p class="card-text{% if line.startswith('-') %} margin-bottom-zero{% endif %}" data-start="{{ start }}">{{ nbsp_at_start(line) }}</p>
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue