From d9daf73afb2ebc911a7b4e31d607b22909bae190 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 17 Feb 2021 09:22:26 +0100 Subject: [PATCH] fix: replace markdownify with renderString to use render hooks (#65) --- layouts/shortcodes/columns.html | 2 +- layouts/shortcodes/expand.html | 2 +- layouts/shortcodes/hint.html | 2 +- layouts/shortcodes/include.html | 2 +- layouts/shortcodes/tabs.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/layouts/shortcodes/columns.html b/layouts/shortcodes/columns.html index ce92aee..5d1636f 100644 --- a/layouts/shortcodes/columns.html +++ b/layouts/shortcodes/columns.html @@ -1,7 +1,7 @@
{{ range split .Inner "<--->" }}
- {{ . | markdownify }} + {{ . | $.Page.RenderString }}
{{ end }}
diff --git a/layouts/shortcodes/expand.html b/layouts/shortcodes/expand.html index c2540bc..0ab3d2a 100644 --- a/layouts/shortcodes/expand.html +++ b/layouts/shortcodes/expand.html @@ -6,6 +6,6 @@
- {{ .Inner | markdownify }} + {{ .Inner | $.Page.RenderString }}
diff --git a/layouts/shortcodes/hint.html b/layouts/shortcodes/hint.html index 5506853..1b1c0c9 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/include.html b/layouts/shortcodes/include.html index 17540da..0a9df6f 100644 --- a/layouts/shortcodes/include.html +++ b/layouts/shortcodes/include.html @@ -1,7 +1,7 @@ {{$file := .Get "file"}}
{{- if eq (.Get "markdown") "true" -}} -{{- $file | readFile | markdownify -}} +{{- $file | readFile | $.Page.RenderString -}} {{- else if (.Get "language") -}} {{- highlight ($file | readFile) (.Get "language") (default "linenos=table" (.Get "options")) -}} {{- else -}} diff --git a/layouts/shortcodes/tabs.html b/layouts/shortcodes/tabs.html index fb9965a..2b666f5 100644 --- a/layouts/shortcodes/tabs.html +++ b/layouts/shortcodes/tabs.html @@ -10,7 +10,7 @@ {{ $tab.Name }}
- {{ .Content | markdownify }} + {{ .Content | $.Page.RenderString }}
{{ end }}