Add article in ingredients

This commit is contained in:
Théophile Bastian 2019-05-13 13:45:25 +02:00
parent dafdd206d6
commit e68a971b4c

View file

@ -14,6 +14,11 @@
{{ range $.Param "ingredients" }}
<li>
<span class="ingred-qt">{{ with .qt }}{{ . }}{{ end }}</span>
{{ with .article -}}
{{ . -}}
{{- if substr . -1 1 | eq "'" -}}{{ else }} {{ end -}}
{{/* ^^^ No space only if article ends with an apostrophe */}}
{{- end -}}
<span class="ingred-name">{{ .name }}</span>
</li>
{{ end }}