diff --git a/layouts/shortcodes/tabpane.html b/layouts/shortcodes/tabpane.html index d6689f2d65..beda48917e 100644 --- a/layouts/shortcodes/tabpane.html +++ b/layouts/shortcodes/tabpane.html @@ -1,4 +1,7 @@ {{/* Check parameter types */ -}} + +{{ $tpPersistAttrName := "data-td-tp-persist" -}} + {{ with .Get "langEqualsHeader" -}} {{ if ne ( printf "%T" . ) "bool" -}} {{ errorf "Shortcode %q: boolean value expected for parameter %q, but got %s. Error position: %s" $.Name "langEqualsHeader" (printf "%T" .) $.Position -}} @@ -81,6 +84,7 @@ {{ else if eq $persistKeyKind "header" -}} {{ $persistKey = $element.header -}} {{ end -}} + {{ $persistKey = $persistKey | lower -}} {{/* Check for duplicate tab-persistence keys */ -}} {{ if and $persistTab $persistKey -}} @@ -98,8 +102,6 @@ {{ $rightpush = . -}} {{ end -}} - {{/* Replace by "-" all chars that are not valid in a CSS class name: */ -}} - {{ $persistKey = replaceRE "[^a-zA-Z0-9_-]" "-" $persistKey | lower -}}