From 0272ec3d07bf82044468c5e7db67aeeadfd1e711 Mon Sep 17 00:00:00 2001 From: m Date: Wed, 25 Mar 2026 08:14:00 +0100 Subject: [PATCH] fix --- templates/components/post_renderer.html | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/templates/components/post_renderer.html b/templates/components/post_renderer.html index 9514880..5345a0f 100644 --- a/templates/components/post_renderer.html +++ b/templates/components/post_renderer.html @@ -1,12 +1,11 @@ {% macro render_post(post) %}
- {% if post.content is iterable and post.content is not string %} {# content is - [] → render blocks #} {% for block in post.content %} {% if block.type == - "image" %} {% with src=url_for('content_image_files', filename=block.src) %} - {% include "components/image.html" %} {% endwith %} {% endif %} {% elif - block.type == "text" %} {{ block.value | safe }} {% endif %} {% elif - block.type == "code" %} {% with value=block.src %} {% include - "components/code.html" %} {% endwith %} {% endif %} {% endfor %} {% else %} {# - content is """...""" → render HTML #} {{ post.content | safe }} {% endif %} + {% if post.content is iterable and post.content is not string %} {% for block + in post.content %} {% if block.type == "image" %} {% with + src=url_for('content_image_files', filename=block.src) %} {% include + "components/image.html" %} {% endwith %} {% elif block.type == "text" %} {{ + block.value | safe }} {% elif block.type == "code" %} {% with + value=block.value %} {% include "components/code.html" %} {% endwith %} {% + endif %} {% endfor %} {% else %} {{ post.content | safe }} {% endif %}
{% if post.template %} {% include post.template %} {% endif %} {% endmacro %}