Shortcode HTML inside code blocks not rendering and replaced with a space?

Hi, I have a shortcode, “bolder” with (this is actually a span in my config, but I think a standard tag would be easier to demonstrate):

<b>{{- .Inner | safeHTML -}}</b>

And I have a page with:

words {{< bolder >}}some text that should be bold{{< /bolder >}} more words

For some reason, the shortcode makes the stuff around it disappear in the rendered HTML. The words between the tags get replaced with a single space, but only for certain languages like C or SQL. This does not happen with some other languages like YAML, and it also works if you do not specify a language at all.

words {{< bolder >}}some text that should be bold{{< /bolder >}} more words

Is there a way to get this to work with other languages besides YAML?

Hugo version is hugo v0.99.1-d524067382e60ce2a2248c3133a1b3af206b6ef1+extended windows/amd64 BuildDate=2022-05-18T11:18:14Z VendorInfo=gohugoio, and I cannot update it right now, so I would like to ge\t it working with this version if possible. Thank you.

You need to update to v0.111.3 or later. The current version is v0.115.4.

I see, thank you for giving me the version where it was fixed!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.