# Issues with syntax highlighting (r tag)

I've noticed that there seem to be issues with the syntax highlighting.

Take this recent post as an example:

Clearly, the question is tagged . Thus, R syntax highlighting should be applied. However, it isn't. You can easily see that because comments (starting with #) should be grey. I suspect a default (C?) highlighting is applied. The strange thing is that in some posts correct syntax highlighting is used (example) and in some not.

Here is a screenshot from Stack Overflow showing the correct syntax highlighting:

• Even adding <!-- lang-all: lang-r --> doesn't seem to work :-(. Oct 19, 2021 at 11:32
• It's a bug, probably not only related to CrossValidated.com, but likely also other sites, so I'm moving it to the Meta site.
– Tim Mod
Oct 19, 2021 at 12:54
• @Tim you can fix it yourself, at the bottom of this page. On SO, the setting is correct: stackoverflow.com/tags/r/info Oct 19, 2021 at 13:00
• @Glorfindel thanks, I wasn't aware of this setting.
– Tim Mod
Oct 19, 2021 at 13:06

I learned something new today. Apparently the tag wiki pages have default syntax highlighting setting on the bottom and we used the default one for the [r] tag (for Python it is correct).

Now it's fixed.

Alternatively, remember that you can always use

<!-- lang-all: lang-r -->


somewhere in the body of the post to set highlighting for all snippets, or start the snippet with

lang-r

• I wonder how it got changed. The setting for the [r] tag used to be correct. Also, I tried <!-- lang-all: lang-r -->` on the linked page & it didn't turn on the correct syntax highlighting, but I spent very little time on it. Oct 20, 2021 at 11:19
• @gung-ReinstateMonica unfortunately I have no idea as well.
– Tim Mod
Oct 20, 2021 at 11:48