From 0cde2e461d1cca74f45586f410cf194afc5b5d15 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Mon, 30 Aug 2021 14:32:11 +0200 Subject: #370: Allow markdown in details shortcode, also change markdownify to RenderString in other shortcodes --- layouts/shortcodes/button.html | 2 +- layouts/shortcodes/details.html | 5 +++-- layouts/shortcodes/hint.html | 2 +- layouts/shortcodes/tabs.html | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'layouts/shortcodes') diff --git a/layouts/shortcodes/button.html b/layouts/shortcodes/button.html index 8ac2d7e..df50d78 100644 --- a/layouts/shortcodes/button.html +++ b/layouts/shortcodes/button.html @@ -8,5 +8,5 @@ {{ $ref = relref $ . }} {{ end }} - {{ $.Inner | markdownify }} + {{ .Inner | .Page.RenderString }} diff --git a/layouts/shortcodes/details.html b/layouts/shortcodes/details.html index f6fff38..cc867aa 100644 --- a/layouts/shortcodes/details.html +++ b/layouts/shortcodes/details.html @@ -1,6 +1,7 @@
- {{ cond .IsNamedParams (.Get "title") (.Get 0) }} + {{- $summary := cond .IsNamedParams (.Get "title") (.Get 0) -}} + {{ $summary | .Page.RenderString }}
- {{ .Inner | markdownify }} + {{ .Inner | .Page.RenderString }}
diff --git a/layouts/shortcodes/hint.html b/layouts/shortcodes/hint.html index 066aa68..a7471dc 100644 --- a/layouts/shortcodes/hint.html +++ b/layouts/shortcodes/hint.html @@ -1,3 +1,3 @@
- {{ .Inner | markdownify }} + {{ .Inner | .Page.RenderString }}
diff --git a/layouts/shortcodes/tabs.html b/layouts/shortcodes/tabs.html index 01c1a63..b28eadf 100644 --- a/layouts/shortcodes/tabs.html +++ b/layouts/shortcodes/tabs.html @@ -9,7 +9,7 @@ {{- $tab.Name -}}
- {{- .Content | markdownify -}} + {{- .Content | $.Page.RenderString -}}
{{- end -}} -- cgit v1.2.3