#782, Fix open attribute on details shorcode, delete when false

This commit is contained in:
Alex Shpak
2025-10-20 00:07:08 +02:00
parent cec082b8dd
commit 2687e34ac0
+3 -3
View File
@@ -1,8 +1,8 @@
{{- $open := cond .IsNamedParams (in (slice "true" true) (.Get "open")) (in .Params "open") -}}
{{- $attributes := partial "docs/text/mapper" (dict {{- $attributes := partial "docs/text/mapper" (dict
"attributes" (cond .IsNamedParams .Params dict) "attributes" (cond .IsNamedParams .Params dict)
"merge" (dict "merge" (dict "open" $open)
"open" (cond .IsNamedParams (.Get "open") (in .Params "open")) "delete" (cond $open (slice) (slice "open"))
)
) -}} ) -}}
<details {{ partial "docs/html-attrs" $attributes | safeHTMLAttr }}> <details {{ partial "docs/html-attrs" $attributes | safeHTMLAttr }}>
{{- $summary := cond .IsNamedParams (.Get "title") (.Get 0) -}} {{- $summary := cond .IsNamedParams (.Get "title") (.Get 0) -}}