From 1e20aaedab5c0c8aab1a2543b776bdb4551dcce2 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Sat, 14 May 2022 12:54:33 +0800 Subject: [PATCH] :zap: Perf: use .RenderString instead of markdownify (#105) --- layouts/shortcodes/admonition.html | 4 ++-- layouts/shortcodes/details.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/shortcodes/admonition.html b/layouts/shortcodes/admonition.html index edab8577..b46a9593 100644 --- a/layouts/shortcodes/admonition.html +++ b/layouts/shortcodes/admonition.html @@ -18,7 +18,7 @@ {{- $type := .Get "type" | default "note" -}}
- {{ .Get "title" | markdownify | default (T $type) }} + {{ .Get "title" | .Page.RenderString | default (T $type) }}
@@ -30,7 +30,7 @@ {{- $type := .Get 0 | default "note" -}}
- {{ .Get 1 | markdownify | default (T $type) }} + {{ .Get 1 | .Page.RenderString | default (T $type) }}
diff --git a/layouts/shortcodes/details.html b/layouts/shortcodes/details.html index bdca171b..a08ec358 100644 --- a/layouts/shortcodes/details.html +++ b/layouts/shortcodes/details.html @@ -1,4 +1,4 @@
- {{ .Get "summary" | default (.Get 0) | markdownify }} - {{ .Inner | markdownify }} + {{ .Get "summary" | default (.Get 0) | .Page.RenderString }} + {{ .Inner | .Page.RenderString }}
\ No newline at end of file