hugo-soresu

My fork of hugo-xmin

git clone git://git.shimmy1996.com/hugo-soresu.git
commit fe0c5a931719193f37a8d09c373757e6dae5503c
parent 13d6bcbda581dc53b4850e6fac34bb6dbe3707d2
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Thu, 25 Apr 2019 00:09:27 -0400

Remove spaces around i18n results

Diffstat:
Mlayouts/partials/i18n_fallback.html | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/layouts/partials/i18n_fallback.html b/layouts/partials/i18n_fallback.html
@@ -1,6 +1,5 @@
-{{ $translation := i18n (lower .) }}
-{{ if eq $translation "" }}
-  {{ if eq . (lower .)}} {{ . | humanize }} {{ else }} {{ . }} {{ end }}
-{{ else }}
-  {{ $translation }}
-{{ end }}
+{{- with i18n (lower .) -}}
+  {{- . -}}
+{{- else -}}
+  {{- if eq . (lower .) -}} {{- . | humanize -}} {{- else -}} {{- . -}} {{- end -}}
+{{- end -}}