1

Possible Duplicate:
Syntax highlighting hints

The parser for code blocks has some kind of heuristic (the "Prettify" library, IIUC) for guessing what programming language syntax to use for highlighting. Its guesses are far from perfect, though.

While inferring the syntax from tags has been suggested, that doesn't help when there are code examples in different languages, or when the code is in an answer but the question doesn't deserve to be tagged with that language.

Instead, I suggest we need a way to declare what language a code sample is, to help the syntax highlighter to know rather than guess. Unlike other existing questions asking about hints or inferrals, I'm talking about an explicit declaration that a specific code block is to be highlighted as a specific language syntax.

1