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

Possible Duplicate:
Changes to syntax highlighting

Over at ServerFault we are having a community discussion about wether or not we should enable code highlighting.

However we can't seem to find the answer to a question we have:

When code highlighting is enabled on the site, does it always try to highlight code-blocks, even when no 'languages' are tied to tags? Does it do nothing unless you manually override it?

You can follow our discussion here.

This is important for us because we don't want it to try and detect some random error-dump and go all crazy on colors. The only way we would use this is by using the manual override, as described here by Jeff.

share|improve this question

marked as duplicate by Michael Mrozek, Adam Jan 24 '12 at 0:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

@MichaelMrozek Doesn't tell wether or not it is possible to only enable the manual-part and not the automatic. – Bart De Vos Jan 23 '12 at 23:57
It sure seems like it does. Each tag can have specific and default language hints -- if none of the tags have either, only the manual override is going to do anything – Michael Mrozek Jan 24 '12 at 0:00
@TiZon Highlighting can be enabled for the site and not specified automatically for any tag. Still, even on code-heavy sites it's pretty rare that syntax highlighting does something horrifically bad that can't be fixed on a case-by-case basis. – Adam Jan 24 '12 at 0:01

It doesn't look like it's enabled on Server Fault at all, but for the sake of completeness...

Syntax highlighting first has to be enabled on the site and then it can be configured on a per-tag basis.

If your question has a tag that'd trigger syntax highlighting in code blocks, you can use <-- language: lang-none --> to turn it off before a particular code block that you don't want the highlighting to apply to.

share|improve this answer
I've got that link to the list of lang-foo markups on a quickmark, because the tag-hinting gets it right only most of the time. :) – sarnold Jan 23 '12 at 23:38
OK, that is what we figured out. What happens if a post with a code block has no tags that are tied to a language? Will it try to auto-determine it? (standard behavior of prettify) – Bart De Vos Jan 23 '12 at 23:55
@TiZon No highlighting will be applied. Come to think of it, the duplicate Michael Mrozek found does cover this in better detail than I could. :) – Adam Jan 23 '12 at 23:59

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