You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the Templates/Overview page, the documentation mentions a markdown filter, that turns markdown content into HTML. On the Templates/Sections and Pages page, it also explains that both pages and sections get a content variable.
However, as far as I know, it isn't mentioned anywhere, that the content variable already contains HTML. This lead me to use the filter in my template and write {{ page.content | markdown | safe }} instead of {{ page.content | safe }}.
While this might not seem like a problem (since markdown can contain HTML), it causes a problem in code block, where any indentation is removed after an empty line. There might also be other problems I didn't notice.
Proposed solution
Either tell users that the content variable contains HTML on the Templates/Sections and Pages page or tell them to not use the markdown filter on the content variable on the Templates/Overview page.
I personally think the first one is the better solution because otherwise, this would feel like a special case for the content variable, while it actually affects every HTML input.
The text was updated successfully, but these errors were encountered:
Documentation issue
Summary
On the
Templates/Overview
page, the documentation mentions amarkdown
filter, that turns markdown content into HTML. On theTemplates/Sections and Pages
page, it also explains that both pages and sections get acontent
variable.However, as far as I know, it isn't mentioned anywhere, that the
content
variable already contains HTML. This lead me to use the filter in my template and write{{ page.content | markdown | safe }}
instead of{{ page.content | safe }}
.While this might not seem like a problem (since markdown can contain HTML), it causes a problem in code block, where any indentation is removed after an empty line. There might also be other problems I didn't notice.
Proposed solution
Either tell users that the
content
variable contains HTML on theTemplates/Sections and Pages
page or tell them to not use themarkdown
filter on thecontent
variable on theTemplates/Overview
page.I personally think the first one is the better solution because otherwise, this would feel like a special case for the
content
variable, while it actually affects every HTML input.The text was updated successfully, but these errors were encountered: