Skip to content
Snippets Groups Projects
Commit 0cde2e46 authored by Alex Shpak's avatar Alex Shpak
Browse files

#370: Allow markdown in details shortcode, also change markdownify to...

#370: Allow markdown in details shortcode, also change markdownify to RenderString in other shortcodes
parent 4c1de2b3
Branches
No related tags found
No related merge requests found
...@@ -8,5 +8,5 @@ ...@@ -8,5 +8,5 @@
{{ $ref = relref $ . }} {{ $ref = relref $ . }}
{{ end }} {{ end }}
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ 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> </a>
<details {{ if or (.Get "open") (in .Params "open") }}open{{ end }}> <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"> <div class="markdown-inner">
{{ .Inner | markdownify }} {{ .Inner | .Page.RenderString }}
</div> </div>
</details> </details>
<blockquote class="book-hint {{ .Get 0 }}"> <blockquote class="book-hint {{ .Get 0 }}">
{{ .Inner | markdownify }} {{ .Inner | .Page.RenderString }}
</blockquote> </blockquote>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{{- $tab.Name -}} {{- $tab.Name -}}
</label> </label>
<div class="book-tabs-content markdown-inner"> <div class="book-tabs-content markdown-inner">
{{- .Content | markdownify -}} {{- .Content | $.Page.RenderString -}}
</div> </div>
{{- end -}} {{- end -}}
</div> </div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment