{{ $error := false }} {{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "tooltip" "args" .Params) }} {{ errorf "Invalid arguments: %s" .Position -}} {{ $error = true }} {{ end }} {{ $type := "link" -}} {{ $title := trim .Inner " \r\n" | plainify -}} {{ if not $title -}} {{ errorf "Missing inner element text: %s" .Position -}} {{ $error = true }} {{ end -}} {{ $color := .Get "color" | default "primary" -}} {{ $tooltip := .Get "title" | default "" -}} {{ $href := .Get "href" | default "" -}} {{ $placement := .Get "placement" | default "top" -}} {{- $class := .Get "class" | default "" -}} {{- $spacing := .Get "spacing" | default true -}} {{ if not $error }}