Commit 49a1467b236073850a701ca429c5018d1025eda9

Golmote 2014-12-22T09:14:46

Add CoffeeScript examples + fix others

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>