Change highlight wrapper class

I’m trying out Chroma syntax highlighting on my fenced code blocks, for which I was using Prism before. Looks good, but the addition of the <div class="highlight"> wrapper isn’t desirable. What’s the best way to either remove that or rename the class? Is it a shortcode that needs to be overwritten?

What does “isn’t desirable” mean? It’s a class that is added by Chroma. It’s probably documented somewhere on their documentation how to override this, but in my opinion having issues with a classname points to a deeper problem in your code.

Oh, I assumed it was Hugo adding that, as it doesn’t seem to be mentioned in the Chroma repo. Are there docs aside from the readme that I have missed?

Probably best not to derail this thread with a discussion about naming conventions :wink:

On deeper dive I think it might be Hugo who is adding the class="highlight" part.

but still… it might be possible to catch this occurence with a very specific cascading style sheet hit. like .my-code-example .hightlight or something like that. It doesn’t look like you will be able to configure anything about that.