Add CoffeeScript examples + fix others
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
diff --git a/examples/prism-bash.html b/examples/prism-bash.html
index c92f8b1..fddd875 100644
--- a/examples/prism-bash.html
+++ b/examples/prism-bash.html
@@ -2,8 +2,7 @@
<p>To use this language, use the class "language-bash".</p>
<h2>Shebang</h2>
-<pre><code>#!/bin/bash
-#!/bin/sh</code></pre>
+<pre><code>#!/bin/bash</code></pre>
<h2>Comments</h2>
<pre><code># This is a comment</code></pre>
diff --git a/examples/prism-coffeescript.html b/examples/prism-coffeescript.html
new file mode 100644
index 0000000..8835469
--- /dev/null
+++ b/examples/prism-coffeescript.html
@@ -0,0 +1,64 @@
+<h1>CoffeeScript</h1>
+<p>To use this language, use the class "language-coffeescript".</p>
+
+<h2>Comments</h2>
+<pre><code># This is a comment
+### This is a
+multi-line comment###</code></pre>
+
+<h2>Strings</h2>
+<pre><code>'foo \'bar\' baz'
+ "foo \"bar\" baz"
+'Multi-line
+strings are supported'
+"Multi-line
+strings are supported"
+''' 'Block strings'
+are supported too'''
+""" "Block strings"
+are supported too"""</code></pre>
+
+<h2>String interpolation</h2>
+<pre><code>"String #{interpolation} is supported"
+'This works #{only} between double-quoted strings'</code></pre>
+
+<h2>Object properties</h2>
+<pre><code>kids =
+ brother:
+ name: "Max"
+ age: 11
+ sister:
+ name: "Ida"
+ age: 9</code></pre>
+
+<h2>Regexps</h2>
+<pre><code>/normal [r]egexp?/;
+/// ^(
+ mul\t[i-l]ine
+ regexp # with embedded comment
+) ///</code></pre>
+
+<h2>Classes</h2>
+<pre><code>class Animal
+ constructor: (@name) ->
+ move: (meters) ->
+ alert @name + " moved #{meters}m."
+
+class Snake extends Animal
+ move: ->
+ alert "Slithering..."
+ super 5
+
+class Horse extends Animal
+ move: ->
+ alert "Galloping..."
+ super 45
+
+sam = new Snake "Sammy the Python"
+tom = new Horse "Tommy the Palomino"
+
+sam.move()
+tom.move()</code></pre>
+
+<h2>Inline JavaScript</h2>
+<pre><code>`alert("foo")`</code></pre>
\ No newline at end of file
diff --git a/examples/prism-sql.html b/examples/prism-sql.html
index f26706e..5de3387 100644
--- a/examples/prism-sql.html
+++ b/examples/prism-sql.html
@@ -26,12 +26,12 @@ SET @`quoted-variable` = 3;</code></pre>
<h2>Operators</h2>
<pre><code>SELECT 1 && 1;
SELECT 1 OR NULL;
-SELECT 5 & ~1;
+SELECT 5 & 2*3;
SELECT 2 BETWEEN 1 AND 3;</code></pre>
<h2>Functions and keywords</h2>
-<pre><code>SELECT COUNT(*) AS cpt,
-FROM `table`
+<pre><code>SELECT COUNT(*) AS cpt, MAX(t.pos) AS max_pos
+FROM `my_table`
LEFT JOIN `other_table` AS t
WHERE `somecol` IS NOT NULL
ORDER BY t.other_col DESC</code></pre>