Skip to content

Commit 1aa66aa

Browse files
committed
Add Clojure to highlight.js, add code highlight example to README.
1 parent 2f48c27 commit 1aa66aa

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,36 @@ This is based on [data-markdown](https://gist.github.com/1343518) from [Paul Iri
4949
</section>
5050
```
5151

52+
### Code syntax higlighting
53+
54+
By default, Reveal is configured with [highlight.js](http://softwaremaniacs.org/soft/highlight/en/) for code syntax highlighting. For example, a section like this:
55+
56+
```html
57+
<section>
58+
<p align="left">
59+
<code class="clojure">
60+
<pre>
61+
(def lazy-fib
62+
(concat
63+
[0 1]
64+
((fn rfib [a b]
65+
(lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
66+
</pre>
67+
</code>
68+
</p>
69+
</section>
70+
71+
```
72+
73+
Will render like this:
74+
75+
```clojure
76+
(def lazy-fib
77+
(concat
78+
[0 1]
79+
((fn rfib [a b]
80+
(lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
81+
```
5282

5383
### Configuration
5484

0 commit comments

Comments
 (0)