Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

The syntax highlighter works well, in most cases. But there's one point that irks me.

In C programs, the highlighter gives variables that start with an uppercase letter a different colour.

See this post for instance, where the name Aa is displayed in cyan instead of black like the other identifiers.

Or even better, this lovely answer (as long as that one doesn't get edited into something sensible).


Now for languages like C#, this might make sense, because all of the .NET API is title-cased, so you can distinguish between system identifiers and local identifiers this way, presuming that local identifiers are lowercase. In C however, none of the libraries have title-cased words, and this distinction doesn't make sense.

So, can this be corrected?

share|improve this question
that is correctly highlighted as lang-c so as Ernest suggested, I recommend reporting that to the Google Prettify folks – Jeff Atwood Jun 12 '12 at 20:03
The post you're referring to can easily be fixed by using <pre></pre> instead of the spaces. Furthermore, in this case, the > (quote) has to be used instead, because it's a citation, not a block of code / formatted text. I've edited the post. – Rob W Jun 12 '12 at 20:07
Presumably this is to accord with the long standing convention of naming preprocessor macros in ALLCAPS, and someone has just been lazy about the definitions. – dmckee Jun 12 '12 at 20:49
up vote 5 down vote accepted

Syntax highlighting is handled using Google Code Prettify. You'd have to report this problem to them (and abide by their decision regarding whether it's a problem or not; I'd say it was.)

EDIT: This seems to have been reported at least twice: see bug 70 and bug 114.

share|improve this answer
OK. It was in the bug list already, naturally. I voted for the bug. That was it. – Mr Lister Jun 12 '12 at 20:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .