{{/* Check parameter type */ -}} {{ $code := false -}} {{ with .Get "code" -}} {{ $type := printf "%T" . -}} {{ if ne $type "bool" -}} {{ errorf `shortcode 'card': boolean value expected for parameter 'code', but got %s` $type -}} {{ else }} {{ $code = . -}} {{ end -}} {{ end -}} {{ $lang := default "" (.Get "lang") -}} {{ $highlight := default "" (.Get "highlight") -}}
{{ with $.Get "header" -}}
{{ . | markdownify }}
{{ end -}}
{{ with $.Get "title" -}}
{{ . | markdownify -}}
{{ end -}} {{ with $.Get "subtitle" -}}
{{ . | markdownify -}}
{{ end -}} {{ with $.Inner -}} {{ if $code -}} {{ highlight . $lang $highlight -}} {{ else -}}

{{ . -}}

{{ end -}} {{ end -}}
{{ with $.Get "footer" -}} {{ end -}}