{{- if .Parent -}}
    {{- $name := trim (.Get "name") " " -}}
    {{- $category_value := trim (.Get "category-value") " " -}}
    {{- if not (.Parent.Scratch.Get "tabs") -}}
        {{- .Parent.Scratch.Set "tabs" slice -}}
    {{- end -}}
    {{- $.Parent.Scratch.Add "tabs" (dict "name" $name "category_value" $category_value "content" .Inner) -}}
{{- else -}}
    {{- errorf "Missing surrounding tabset for tab (%s)" .Position -}}
{{- end -}}
