mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
fix(icon): trim white spaces
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{{ $icon := resources.Get (print "icons/" . ".svg") }}
|
{{- $icon := resources.Get (print "icons/" . ".svg") -}}
|
||||||
{{ if $icon }}
|
{{- if $icon -}}
|
||||||
<span class="relative block icon">
|
<span class="relative block icon">
|
||||||
{{ $icon.Content | safeHTML }}
|
{{- $icon.Content | safeHTML -}}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
{{ $icon := resources.Get (printf "icons/%s.svg" ($.Get 0)) }}
|
{{- /* Avoid extra whitespace */ -}}
|
||||||
{{ if $icon }}
|
{{- /* https://discourse.gohugo.io/t/55399/5 */ -}}
|
||||||
|
{{- $icon := resources.Get (printf "icons/%s.svg" ($.Get 0)) -}}
|
||||||
|
{{- if $icon -}}
|
||||||
<span class="relative inline-block align-text-bottom icon">
|
<span class="relative inline-block align-text-bottom icon">
|
||||||
{{ $icon.Content | safeHTML }}
|
{{- strings.Replace $icon.Content "\n" "" | safeHTML -}}
|
||||||
</span>
|
</span>
|
||||||
{{ else }}
|
{{- else -}}
|
||||||
{{ errorf `[BLOWFISH] Shortcode "icon" error in "%s": Resource "%s" not found. Check the path is correct or remove the shortcode.` .Page.Path (printf "icons/%s.svg" ($.Get 0)) }}
|
{{- errorf `icon shortcode: resource "%s" not found. Check the path is correct or remove the shortcode: %s` (printf "icons/%s.svg" ($.Get 0)) .Position -}}
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user