Add Clojure to highlight.js, add code highlight example to README.

This commit is contained in:
Aaron Steele 2013-01-21 17:53:39 -08:00
parent 2f48c27201
commit 1aa66aa469
2 changed files with 31 additions and 6 deletions

View File

@ -49,6 +49,36 @@ This is based on [data-markdown](https://gist.github.com/1343518) from [Paul Iri
</section>
```
### Code syntax higlighting
By default, Reveal is configured with [highlight.js](http://softwaremaniacs.org/soft/highlight/en/) for code syntax highlighting. For example, a section like this:
```html
<section>
<p align="left">
<code class="clojure">
<pre>
(def lazy-fib
(concat
[0 1]
((fn rfib [a b]
(lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
</pre>
</code>
</p>
</section>
```
Will render like this:
```clojure
(def lazy-fib
(concat
[0 1]
((fn rfib [a b]
(lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
```
### Configuration

File diff suppressed because one or more lines are too long