I think it is time to revisit the syntax highlighting question. There is a [similar request][1] that suggests using HTML comments to activate highlighting for specific posts. I would rather implement something like we have over on SO and U&L where syntax highlighting is activated according to a question's tags.

So, if a question is tagged as [tag:bash], any `<code></code>` blocks in the answer get `bash` highlighting. If it is tagged as [tag:Perl], the questions get Perl syntax highlighting etc.

I agree with the decision to turn off syntax highlighting on SU by default. It was indeed more often a hindrance than a help. Nevertheless, while many, if not most, SU posts do not need and should not have syntax highlighting, there are many that would. For example, many of these:

* [3,276 questions tagged with][2] [tag:bash]
* [1,034 questions tagged with][3] [tag:emacs]
* [6,221 questions tagged with][4] [tag:batch]
* [1,627 questions tagged with][5] [tag:awk]

While not all would benefit from syntax highlighting, many would. Since this is already implemented in a tag-dependent manner on U&L I imagine it would be simple to also activate it here. I think that syntax highlighting only for certain tags would improve SU while not affecting the great majority of questions that need no highlighting.


  [1]: http://meta.superuser.com/q/4266/151431
  [2]: http://superuser.com/questions/tagged/bash
  [3]: http://superuser.com/questions/tagged/emacs
  [4]: http://superuser.com/search?q=batch
  [5]: http://superuser.com/search?q=awk