{{ if or (hasPrefix .Inner "\n") (hasPrefix .Inner "
") }} $$ {{ $inner := trim (.Inner | htmlUnescape) "$\n " }} {{- replace $inner "\n" " " -}} $$ {{ else }} ${{- trim (.Inner | htmlUnescape) "$\n " -}}$ {{ end }}