fix: Hugo minfiy removes spaces in Figure captions

Add explicit   to prevent Hugo stripping desired spaces.

Fix #1972
This commit is contained in:
George Cushen committed 2020-11-19 20:22:04 +00:00
1 parent c9c3e5f51a
commit 4dc8eff074
1 file changed
+1 -1
+1 -1
View File
@@ -47,7 +47,7 @@
{{ if $caption }}
{{/* Localize the figure numbering (if enabled). */}}
{{ $figure := split (i18n "figure" | default "Figure %d:") "%d" }}
<figcaption{{ if eq (.Get "numbered") "true" }} data-pre="{{ index $figure 0 }}" data-post="{{ index $figure 1 }}" class="numbered"{{ end }}>
<figcaption{{ if eq (.Get "numbered") "true" }} data-pre="{{- trim (index $figure 0) " " -}}&nbsp;" data-post="{{ index $figure 1 }}&nbsp;" class="numbered"{{ end }}>
{{ $caption | markdownify | emojify }}
</figcaption>
{{ end }}