Code highlighting

This commit is contained in:
Thomas Sileo
2019-08-25 00:16:39 +02:00
parent 14e5e6b7e7
commit 562aae86f3
6 changed files with 42 additions and 2 deletions

View File

@@ -77,7 +77,7 @@
{% if obj | has_type(['Article', 'Page']) %}
{{ obj.name }} <a href="{{ obj | url_or_id | get_url }}">{{ obj | url_or_id | get_url }}</a>
{% elif obj | has_type('Question') %}
{{ obj.content | clean | replace_custom_emojis(obj) | safe }}
{{ obj.content | clean | replace_custom_emojis(obj) | code_highlight | safe }}
<ul style="list-style:none;padding:0;">
@@ -146,7 +146,7 @@
{% else %}
{{ obj.content | clean | replace_custom_emojis(obj) | safe }}
{{ obj.content | clean | replace_custom_emojis(obj) | code_highlight | safe }}
{% endif %}
</div>