add inner prop

allows inner shortcodes to be used
This commit is contained in:
Amith211
2020-08-08 16:57:17 +01:00
parent 08dd00930a
commit 567b4c339a
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -8,7 +8,11 @@
{{ if .Get "title" }}<span class="collapsable-code__title">{{ .Get "title" | markdownify }}</span>{{ end }}
<span class="collapsable-code__toggle" data-label-expand="{{ .Get "expand" | default "△" }}" data-label-collapse="{{ .Get "collapse" | default "▽" }}"></span>
</label>
{{ if .Get "inner" }}
{{ .Inner }}
{{ else }}
<pre {{ if .Get "language" }}class="language-{{ .Get "language" }}" {{ end }}><code>{{ .Inner | string }}</code></pre>
{{ end }}
</div>
{{ else }}
{{ errorf "If you want to use the \"collapsable code\" shortcode, you need to pass a mandatory \"language\" param. The issue occured in %q (%q)" .Page.File .Page.Permalink }}