jashkenas/docco — pull request #202 by sgentle (2013-04-17 05:33:45+00:00)
Title: Syntax highlighting of fenced code blocks within documentation

Hi there,

I've added support for syntax-highlighting fenced code blocks inside documentation. This could be useful if you want to write pretty example code in your comments. It defaults to the file's language, but also supports GFM-style language annotations so you can do something like:

```coffeescript
# This code is the Coffeescript equivalent of
# ```javascript
# var x = function(a,b){return a === b;};
# ```
x = (a, b) -> a is b
```
Or in literate style:

This code is the Coffeescript equivalent of
```javascript
var x = function(a,b){return a === b;};
```
x = (a, b) -> a is b

And get docs like:

> This code is the Coffeescript equivalent of
> ```javascript
> var x = function(a,b){return a === b;};
> ```

With code:

> ```coffeescript
> x = (a, b) -> a is b
> ```

I rebuilt the compiled js but not the docs, as that introduced a lot more changes than just mine.