Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I don't seem to see where it says that the blog engine in use supports syntax highlighting for code and the like, does the current configuration support syntax highlighting, and if so, how do I use it?

share|improve this question

Yes, code formatting is supported via a plugin, but it must be enabled per site, so if you try adding it and nothing happens, then you'll have to ask a community team member.

Everything after this line is copy-pasted as a courtesy, and to make lookups easy, and to make sure documentation doesn't evaporate:

Just wrap your code in these tags:

[sourcecode language="css"]
your code here

The language parameter controls how the code is syntax highlighted. The following languages are supported:

  • actionscript3
  • bash
  • clojure
  • coldfusion
  • cpp
  • csharp
  • css
  • delphi
  • erlang
  • fsharp
  • diff
  • groovy
  • html
  • javascript
  • java
  • javafx
  • matlab (keywords only)
  • objc
  • perl
  • php
  • text
  • powershell
  • python
  • r
  • ruby
  • scala
  • sql
  • vb
  • xml

If the language parameter is not set, it will default to “text” (no syntax highlighting).

Code in between the source code tags will automatically be encoded for display, you don’t need to worry about HTML entities or anything.

That's enough of quoting. This was installed some time ago, and is added to Meta.SE as a courtesy to those looking from across the network. Here's the first "in the wild" spotting of this being installed/enabled: Blog and syntax coloration found by random

share|improve this answer
The blog post used by Security appears to be this example:… – random Jun 20 '12 at 23:32
Does this mean we need to specifically ask for something for our blog at security? – Rory Alsop Jun 21 '12 at 8:14

You must log in to answer this question.

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