I think it is time to revisit the syntax highlighting question. There is a similar request 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 bash, any
<code></code> blocks in the answer get
bash highlighting. If it is tagged as 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 do. For example, many of these:
- 3,276 questions tagged with bash
- 1,034 questions tagged with emacs
- 6,221 questions tagged with batch
- 1,627 questions tagged with 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.
I would also be happy if we could simply allow the HTML comments to prettify code as suggested in the question linked above. Anything that allows me to optionally allow code highlighting, at the very least for my own answers, would be great.