2

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?

2

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
[/sourcecode]

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

You must log in to answer this question.

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