diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2021-08-30 14:32:11 +0200 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2021-08-30 14:32:11 +0200 |
commit | 0cde2e461d1cca74f45586f410cf194afc5b5d15 (patch) | |
tree | 2818cdae4c7c43b2f8b5440f8eeb43491a5180c6 /layouts/shortcodes | |
parent | 4c1de2b3de979d91a51219c13b4c917c9c7fdc2e (diff) |
#370: Allow markdown in details shortcode, also change markdownify to RenderString in other shortcodes
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r-- | layouts/shortcodes/button.html | 2 | ||||
-rw-r--r-- | layouts/shortcodes/details.html | 5 | ||||
-rw-r--r-- | layouts/shortcodes/hint.html | 2 | ||||
-rw-r--r-- | layouts/shortcodes/tabs.html | 2 |
4 files changed, 6 insertions, 5 deletions
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 }} <a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}"> - {{ $.Inner | markdownify }} + {{ .Inner | .Page.RenderString }} </a> 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 @@ <details {{ if or (.Get "open") (in .Params "open") }}open{{ end }}> - <summary>{{ cond .IsNamedParams (.Get "title") (.Get 0) }}</summary> + {{- $summary := cond .IsNamedParams (.Get "title") (.Get 0) -}} + <summary>{{ $summary | .Page.RenderString }}</summary> <div class="markdown-inner"> - {{ .Inner | markdownify }} + {{ .Inner | .Page.RenderString }} </div> </details> 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 @@ <blockquote class="book-hint {{ .Get 0 }}"> - {{ .Inner | markdownify }} + {{ .Inner | .Page.RenderString }} </blockquote> 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 -}} </label> <div class="book-tabs-content markdown-inner"> - {{- .Content | markdownify -}} + {{- .Content | $.Page.RenderString -}} </div> {{- end -}} </div> |