HUGO

Isset function adding whitespace if false

I’m trying to add content as follows:

{{ if isset .Params "journal" }}<i>{{- .Params.journal -}}</i>{{ end }}
{{ if isset .Params "booktitle" }}<i>{{- .Params.booktitle -}}</i>{{ end }}
{{ if isset .Params "volume" }}{{- .Params.volume -}}{{ end }}
{{ if isset .Params "issue" }}({{- .Params.issue -}}){{ end }}

The rendered version adds whitespace if the isset is evaluated to false. Is there any way I can avoid this?

See: