From 505b4e18bd3c6953dc8d0b3f71bddd18265f44df Mon Sep 17 00:00:00 2001 From: TheAMM Date: Tue, 30 May 2017 18:56:09 +0300 Subject: [PATCH] Move to markdown-it, render markdown in DOMContentLoaded No more separate - + diff --git a/nyaa/templates/view.html b/nyaa/templates/view.html index b78594d..9c9595f 100644 --- a/nyaa/templates/view.html +++ b/nyaa/templates/view.html @@ -81,13 +81,13 @@
-
- {% if torrent.description %} +
+ {%- if torrent.description -%} {# Escape newlines into html entities because CF strips blank newlines #} - {{ torrent.description | escape | replace('\r\n', '\n') | replace('\n', ' '|safe) }} - {% else %} + {{- torrent.description | escape | replace('\r\n', '\n') | replace('\n', ' '|safe) -}} + {%- else -%} #### No description. - {% endif%} + {%- endif -%}
@@ -161,19 +161,12 @@
{# Escape newlines into html entities because CF strips blank newlines #} -
{{ comment.text }}
+
{{ comment.text }}
- + {% endfor %} {% if comment_form %}
@@ -207,13 +200,4 @@ - - {% endblock %} \ No newline at end of file