From 580ea885e3927d5023b3a3bfa4a3178652b246b7 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 24 Jun 2022 10:54:16 +0200 Subject: [PATCH] fix: fix broken rendering of nested buttons (#443) --- layouts/shortcodes/button.html | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/layouts/shortcodes/button.html b/layouts/shortcodes/button.html index 58f1eb8..fb87840 100644 --- a/layouts/shortcodes/button.html +++ b/layouts/shortcodes/button.html @@ -1,26 +1,26 @@ -{{ $ref := "" }} -{{ $target := "" }} -{{ $size := default "regular" (.Get "size" | lower) }} +{{- $ref := "" }} +{{- $target := "" }} +{{- $size := default "regular" (.Get "size" | lower) }} -{{ if not (in (slice "regular" "large") $size) }} - {{ $size = "regular" }} -{{ end }} +{{- if not (in (slice "regular" "large") $size) }} + {{- $size = "regular" }} +{{- end }} -{{ with .Get "href" }} - {{ $ref = . }} - {{ $target = "_blank" }} -{{ end }} +{{- with .Get "href" }} + {{- $ref = . }} + {{- $target = "_blank" }} +{{- end }} -{{ with .Get "relref" }} - {{ $ref = relref $ . }} -{{ end }} +{{- with .Get "relref" }} + {{- $ref = relref $ . }} +{{- end }} {{ $.Inner }}