diff --git a/layouts/shortcodes/tab.html b/layouts/shortcodes/tab.html index d13e0338e3..3a9db6c171 100644 --- a/layouts/shortcodes/tab.html +++ b/layouts/shortcodes/tab.html @@ -13,7 +13,7 @@ {{ $header = (.Get 0) -}} {{ else -}} {{/* Prefill header if not given as named or unnamed parameter */ -}} - {{ $header = default (printf "Tab %v" ( add $.Ordinal 1)) (.Get "header") -}} + {{ $header = .Get "header" | default (printf "Tab %v" .Ordinal) -}} {{ end -}} {{/* store all tab info in dict tab */ -}} diff --git a/layouts/shortcodes/tabpane.html b/layouts/shortcodes/tabpane.html index beda48917e..d67567b08a 100644 --- a/layouts/shortcodes/tabpane.html +++ b/layouts/shortcodes/tabpane.html @@ -47,22 +47,16 @@ {{ $persistTab := and $deprecatedPersistLang (ne $persistKeyKind "none") -}} {{ $rightPane := default false ($.Get "right") -}} {{ $activeSet := false -}} -{{- /* Scratchpad gets populated through call to .Inner */ -}} -{{- .Inner -}} +{{/* Scratchpad gets populated through call to .Inner */ -}} +{{ .Inner -}} -{{ $persistKeyList := slice -}} {{ $duplicate := false -}} {{ $duplicateKey := "" -}} - -{{ $Ordinal := $.Ordinal -}} -{{ if ge hugo.Version "0.93.0" -}} - {{ if .Page.Store.Get "Ordinal" -}} - {{ $Ordinal = .Page.Store.Get "Ordinal" -}} - {{end -}} -{{ end -}} +{{ $persistKeyList := slice -}} +{{ $tabPaneOrdinal := .Ordinal -}} {{/* Nav tabs */ -}} -