up vote 1 down vote favorite

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.

link|flag

closed as exact duplicate by fretje, random, Kop, Robert Cartaino, balpha Mar 23 at 12:58

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question.