How can I escape curly brackets within {{code}} sections

I cant figure out how to put curly braces into a {{code}} section.
For example:


I don’t understand the question. Is the problem the red box?

In your example above you haven’t specified the language and thus the macro tries to guess it (but wrongly in this case hence the not-so-perfect highlighting). If this is java you can use:

{{code language="java"}}


Specifying the language fixes this - thanks :slight_smile:

Yes obviously the red box is unwanted! With bigger code sections it gets even more ugly.
I had to do a screenshot as there was no way to include the code example without the forum also rendering it incorrectly.

You can use single backticks in the forum, as in whatever here.

1 Like