Skip to main content
2 of 11
edited title
Oliver Salzburg
  • 88k
  • 2
  • 49
  • 84

Activate tag-dependent syntax highlighting

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 , any <code></code> blocks in the answer get bash highlighting. If it is tagged as , 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:

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.

terdon
  • 53.7k
  • 15
  • 23