I have a shortcode bg to highlight a word with a background color:
<span style="background-color: {{ .Get "color" | safeCSS }};">{{ .Inner }}</span>
Now when I call it within markdown, e.g. with
This is an {{< bg color="red" >}}important phrase{{< /bg >}}, and then comes a comma.
then the output on the website looks like:
This is an important phrase , and then comes a comma.
The problem is the space in front of the comma. It comes because the shortcode call introduces newlines into the HTML.
How can I solve this? I’m grateful for any help!