4

On Stack Overflow, code can have syntax highlighting.

I’d like to have this feature here on Webmasters, too.

Especially the codes:

  • lang-html
  • lang-css
  • lang-js
  • lang-xml

(And lang-none, if auto-detection via tags should work here, too.)

2
  • TBH I didn't realise this wasn't already available on this site! It could be useful for perhaps HTML and XML, however, most other code related questions that involve JS and CSS are generally off-topic.
    – MrWhite
    Commented Mar 29, 2014 at 16:09
  • This makes sense, looking into it.
    – Tim Post StaffMod
    Commented Apr 3, 2014 at 12:12

1 Answer 1

3

This is done, however - there's no default style. You'll need to specify as you use it. We've also enabled this on the Unix related sites, Super User, etc - where questions sometimes have a smidgen of code that has to be shown.

Active both on the main site and on meta (for questions about formatting). Note, code related questions are off-topic, but sometimes questions (and answers) need a bit for context, so I've enabled it.

There are enough limitations with pre-formatted blocks alone that several have asked for this, and there's no harm in enabling it with no default, so I went ahead.

Enjoy!

You must log in to answer this question.

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