| strings.TrimPrefix `\[` }}
{{- $inner = $inner | strings.TrimPrefix `\(` }}
{{- $inner = $inner | strings.TrimSuffix `\]` }}
{{- $inner = $inner | strings.TrimSuffix `\)` }}

{{- /* Determine class attribute. */}}
{{- $class := "math math-inline" }}
{{- if $displayMode }}
    {{- $class = "math math-block" }}
{{- end }}
{{- with $attrs.class }}
    {{- $class = printf "%s %s" $class . }}
{{- end }}

{{- /* Determine id attribute. */}}
{{- $id := printf "h-rh-cb-math-%d" $ordinal }}
{{- with $attrs.id }}
 