diff --git a/sourcing/templates/view.html b/sourcing/templates/view.html index e96fc2b..3c65d7e 100644 --- a/sourcing/templates/view.html +++ b/sourcing/templates/view.html @@ -8,9 +8,9 @@ div#text { font-family: Courier; }
{% for i in line %} {%- if i.highlight -%} - {{- i.highlight -}} + {% if i.highlight != '\n' and i.highlight != '\r\n' %} + {{- i.highlight -}} + {% endif %} {%- else -%} {{- i.text -}} {%- endif -%} @@ -32,6 +34,8 @@ div#text { font-family: Courier; } {%- endfor -%} {% else %} {%- for start, line in iter_lines(doc.text) if line -%} + {#
{% if line != "\n" and line != "\r\n" %}{{ line }}{% else %} {% endif +%}
#}{{ line }}
{%- endfor -%} {% endif %} diff --git a/sourcing/view.py b/sourcing/view.py index d6dd6d2..902c316 100644 --- a/sourcing/view.py +++ b/sourcing/view.py @@ -166,7 +166,7 @@ def view_item(username, hashid, raw=False): @bp.route('/