38

The tag lists C as the language used for code highlighting ("Code Language (used for syntax highlighting): lang-c" on the tag wiki page). This is the incorrect language, as it should be "lang-cpp" (C++).

While sounding minor, it creates a problem for syntax highlighting as the tag is usually used in questions with the tag. According to What is syntax highlighting and how does it work?,

If there's more than one tag that has a highlighting language specified, or if none of the tags have one specified, it uses a default and lets highlight.js infer what's the best language to use.

this will revert to the default mode, which doesn't always correctly recognize the code as C++ code.

Can the language associated with be updated to "lang-cpp" to avoid this conflict? (I'm assuming that if two tags specify the same language, it will be used for coloring.)

4
  • 10
    I'm pondering if another option is to have the highlighting for stl set to <None> here... rather than force it to lang-cpp... that way it'd allow language tags to have their little default guessing without actually something just tagged (perhaps incorrectly and missing a language tag) stl forced to C++ highlighting... Aug 25, 2021 at 21:56
  • 3
    @JonClements That makes sense. Almost 95% of the STL questions are also tagged C++ (the rest would either be missing the language tag or using the STL tag incorrectly). Aug 26, 2021 at 0:20
  • 13
    Okay... for now then... I've set it to be <None> as it's an easily un-doable change (and shouldn't break anything that's not incorrectly tagged) and let's see how that works - if you have a look at a couple of posts you had in mind - are they okay now? Aug 26, 2021 at 2:42
  • 1
    @JonClements Yep, that looks better. Aug 26, 2021 at 15:47

0

You must log in to answer this question.

Browse other questions tagged .