21

On Super User syntax highlighting is turned off. But there are questions on Super User where syntax highlighting can be helpful. Therefore I suggest that syntax highlighting is made possible to enable via prettify language codes (but turned off by default).

Having this feature would mean that a prettify language code, which are certain types of HTML comments, has to be inserted in a post for it to syntax highlighted. For example to syntax highlight a lisp code block in a question the following would have to be inserted before the block:

<!-- language: lang-lisp -->

There are many questions on Super User that would benefit from syntax highlighting. Here are two examples of tags with many questions:

A similar request was made on Ask Ubuntu and they got syntax highlighting enabled.

3
  • 1
    Compared to how many posts don't really need it at all? If it's for a small portion or percentage of total posts, it's not a likely change that would be implemented
    – random Mod
    Commented Feb 3, 2012 at 19:49
  • 7
    @random I suggest that it is turned off by default but possible to enable with prettify language codes which would leave every other post unaffected.
    – N.N.
    Commented Feb 3, 2012 at 19:53
  • 4
    @random The bash tag is on the first page of popular tags and the emacs tag is on the third.
    – N.N.
    Commented Feb 3, 2012 at 19:57

1 Answer 1

9

This has been enabled. Highlighting is now on, with no default language set on both SU and Meta SU. VB highlighting has also been enabled for the VB tag.

You'll need to remember to manually add the hints, and you should be good to go.

Also, this is a pretty advanced feature, so please don't expect new users to know about it (as there's really no way for them to discover it). The best way to show them is to just edit so it's hinted appropriately, and leave a comment noting what / why you edited.

Sorry that this took so long to get to - You've got some pretty great moderators here that ensure things don't fall through the cracks.

You must log in to answer this question.

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