Merge pull request #2704 from RxChi1d/fix/admonition-title-casing

fix(admonition): preserve custom title casing and integrate upstream improvements
This commit is contained in:
Nuno C.
2026-01-12 17:45:21 +00:00
committed by GitHub
2 changed files with 19 additions and 2 deletions

View File

@@ -33,10 +33,10 @@
{{- $normalizedType := index $typeMap $rawType | default $rawType -}}
{{- $iconName := .Attributes.icon | default (index $iconMap $normalizedType) | default "circle-info" -}}
{{- $admonitionTitle := .AlertTitle | default (i18n (printf "admonition.%s" $normalizedType) | default $normalizedType) -}}
{{- $admonitionTitle := .AlertTitle | default ((i18n (printf "admonition.%s" $normalizedType) | default $normalizedType) | title) -}}
{{- $containerClass := "admonition relative overflow-hidden rounded-lg border-l-4 my-3 px-4 py-3 shadow-sm" -}}
{{- $headerClass := "flex items-center gap-2 font-semibold text-inherit capitalize" -}}
{{- $headerClass := "flex items-center gap-2 font-semibold text-inherit" -}}
{{- $contentClass := "admonition-content mt-3 text-base leading-relaxed text-inherit" -}}
{{- $isCollapsible := in (slice "+" "-") .AlertSign -}}