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:
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 -}}