fix: fix rendering of nested shortcodes in tabs (#584)
This commit is contained in:
parent
935b200eb0
commit
882aa9e560
3 changed files with 16 additions and 16 deletions
|
@ -1,12 +1,12 @@
|
|||
{{ if .Parent }}
|
||||
{{ $name := .Get 0 }}
|
||||
{{ $group := printf "tabs-%s" (.Parent.Get 0) }}
|
||||
{{- if .Parent }}
|
||||
{{- $name := .Get 0 }}
|
||||
{{- $group := printf "tabs-%s" (.Parent.Get 0) }}
|
||||
|
||||
{{ if not (.Parent.Scratch.Get $group) }}
|
||||
{{ .Parent.Scratch.Set $group slice }}
|
||||
{{ end }}
|
||||
{{- if not (.Parent.Scratch.Get $group) }}
|
||||
{{- .Parent.Scratch.Set $group slice }}
|
||||
{{- end }}
|
||||
|
||||
{{ .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }}
|
||||
{{ else }}
|
||||
{{- .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }}
|
||||
{{- else }}
|
||||
{{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue