From 341e39b179ad2ce0b9b7fce059ea2243fb4c609a Mon Sep 17 00:00:00 2001
From: Wolfgang Müller
Date: Mon, 9 Aug 2021 18:48:43 +0200
Subject: templates: Render markdown in img's figcaption
The img shortcode inserts, along the picture itself, a figcaption
element containing a brief description. We may want to include links or
other HTML elements in that description. This is not possible right now
because we insert the caption content verbatim.
This commit changes the img shortcode such that markdown is now rendered
inline for the figcaption element.
---
templates/shortcodes/img.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html
index 6b4eca4..b339382 100644
--- a/templates/shortcodes/img.html
+++ b/templates/shortcodes/img.html
@@ -4,6 +4,6 @@
{% if caption -%}
- {{ caption }}
+ {{ caption | markdown(inline=true) | safe }}
{% endif -%}
--
cgit v1.2.3-2-gb3c3