Merge pull request #541 from mouse-reeve/markdown-trimmed-text

Render markdown to html in the right order
This commit is contained in:
Mouse Reeve 2021-01-18 18:55:34 -08:00 committed by GitHub
commit 1c1492d468
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,10 +2,10 @@
{% with 0|uuid as uuid %}
{% if full %}
{% with full|truncatewords_html:60 as trimmed %}
{% with full|to_markdown|safe|truncatewords_html:60 as trimmed %}
{% if trimmed != full %}
<div id="hide-full-{{ uuid }}">
<blockquote class="content" id="trimmed-{{ uuid }}"><span dir="auto">{{ trimmed | to_markdown | safe }}</span>
<blockquote class="content" id="trimmed-{{ uuid }}"><span dir="auto">{{ trimmed }}</span>
{% include 'snippets/toggle/open_button.html' with text="show more" controls_text="full" controls_uid=uuid class="is-small" %}
</blockquote>
</div>