{{ $caption := .caption | markdownify }} {{ $content := .content | markdownify }} {{ $float := .float }} {{ $height := .height }} {{ $maxheight := .maxheight }} {{ $maxwidth := .maxwidth }} {{ $width := .width }} {{ $style := "" }} {{ if $height }} {{ with printf "height: %v" $height }} {{ if $style }} {{ $style = printf "%v; %v" $style . }} {{ else }} {{ $style = . }} {{ end }} {{ end }} {{ end }} {{ if $maxheight }} {{ with printf "max-height: %v" $maxheight }} {{ if $style }} {{ $style = printf "%v; %v" $style . }} {{ else }} {{ $style = . }} {{ end }} {{ end }} {{ end }} {{ if $maxwidth }} {{ with printf "max-width: %v" $maxwidth }} {{ if $style }} {{ $style = printf "%v; %v" $style . }} {{ else }} {{ $style = . }} {{ end }} {{ end }} {{ end }} {{ if $width }} {{ with printf "width: %v" $width }} {{ if $style }} {{ $style = printf "%v; %v" $style . }} {{ else }} {{ $style = . }} {{ end }} {{ end }} {{ end }} {{ $margins := "" }} {{ if $float }} {{ if eq $float "start" }} {{ $margins = "me-4" }} {{ else if eq $float "end" }} {{ $margins = "ms-4" }} {{ else }} {{ errorf "invalid float: %q" $float }} {{ end }} {{ end }}
{{ with $style }}
{{ end }}
{{ $content }}
{{ with $caption }}
{{ . }}
{{ end }} {{ if $style }}
{{ end }}