Browse Source

fix(shortcodes): remove insignificant spaces after external links

Josh Habdas 1 year ago
parent
commit
1190b94326
Signed by: Josh Habdas <jhabdas@protonmail.com> GPG Key ID: B148B31154C75A74
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      layouts/shortcodes/external.html

+ 5
- 5
layouts/shortcodes/external.html View File

@@ -40,10 +40,10 @@ Combined with button shortcode opening in same window with search query:
40 40
 {{ $rel := .Get "rel" }}
41 41
 {{ $itemtype := .Get "itemtype" }}
42 42
 {{ if .IsNamedParams }}
43
-  {{ partial "components/external.html" (dict "href" $href "body" $body "class" $class "referrerpolicy" $referrerpolicy "target" $target "rel" $rel "itemtype" $itemtype "suppress_external" (and .Inner (eq (len (findRE "external" $rel)) 0))) }}
43
+  {{ partial "components/external.html" (dict "href" $href "body" $body "class" $class "referrerpolicy" $referrerpolicy "target" $target "rel" $rel "itemtype" $itemtype "suppress_external" (and .Inner (eq (len (findRE "external" $rel)) 0))) -}}
44 44
 {{ else }}
45
-  {{ partial "components/external.html" (dict "href" (.Get 0)) }}
46
-{{ end }}
47
-{{ if or (and .IsNamedParams (eq $href nil)) (and (eq .IsNamedParams false) (eq (.Get 0) nil)) }}
45
+  {{ partial "components/external.html" (dict "href" (.Get 0)) -}}
46
+{{ end -}}
47
+{{- if or (and .IsNamedParams (eq $href nil)) (and (eq .IsNamedParams false) (eq (.Get 0) nil)) }}
48 48
   <p>{{ partial "components/alert.html" (dict "type" "error" "body" (errorf "Invalid use of external shortcode. Please provide an external link.")) }}</p>
49
-{{ end }}
49
+{{ end -}}

Loading…
Cancel
Save