mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Enable nl2br plugin for Markdown rendering (#1162)
The frontpage text is already markdown, and will receive its formatting via the rich_text filter. When applying the additional linebreaksbr filter, it will add unnecessary blank lines. I'm using the hosted pretix version. Test for frontpage text: ```` Test * test1 * test2 ```` Before (screenshot): ---  ---- After (screenshot): ----  ----
This commit is contained in:
committed by
Raphael Michel
parent
d5747084ec
commit
9b394b3833
@@ -84,7 +84,7 @@ def markdown_compile(source):
|
||||
source,
|
||||
extensions=[
|
||||
'markdown.extensions.sane_lists',
|
||||
# 'markdown.extensions.nl2br', # TODO: Enable, but check backwards-compatibility issues e.g. with mails
|
||||
'markdown.extensions.nl2br'
|
||||
]
|
||||
),
|
||||
tags=ALLOWED_TAGS,
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
{% if frontpage_text and not cart_namespace %}
|
||||
<div>
|
||||
{{ frontpage_text|rich_text|linebreaksbr }}
|
||||
{{ frontpage_text|rich_text }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user