Whitespace in templates.

This commit is contained in:
Fredrik Jonsson 2023-05-28 19:36:58 +02:00
commit 9bdec6ca76

View file

@ -11,7 +11,7 @@
{{ $realheight := 0 -}}
{{ $resource := false -}}
{{ $src := .Destination -}}
{{ $srcsetw := (slice) }}
{{ $srcsetw := (slice) -}}
{{ $static := false -}}
{{ if and $src (fileExists (path.Join "/static" $src)) -}}
@ -38,7 +38,7 @@
{{ $width = $image.Width -}}
{{ $height = $image.Height -}}
{{ if $srcset -}}
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $src (strings.TrimRight "x" $size)) }}
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $src (strings.TrimRight "x" $size)) -}}
{{ end -}}
{{ else -}}
{{ $src = $resource.RelPermalink -}}
@ -48,7 +48,7 @@
{{ if $srcset -}}
{{ range $set := split $srcset " " -}}
{{ $image := $resource.Resize (printf "%sx" $set) -}}
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $image.RelPermalink $set) }}
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $image.RelPermalink $set) -}}
{{ end }}
{{ $width = "" -}}
{{ $height = "" -}}