test/markups/README.litcoffee.html (view raw)
1<h2 id='literate_coffeescript_test'>Literate CoffeeScript Test</h2>
2
3<blockquote>
4<p>Taken from https://github.com/jashkenas/coffee-script/blob/master/test/literate.litcoffee</p>
5</blockquote>
6
7<p>comment comment</p>
8
9<pre><code>test "basic literate CoffeeScript parsing", ->
10 ok yes</code></pre>
11
12<p>now with a…</p>
13
14<pre><code>test "broken up indentation", -></code></pre>
15
16<p>… broken up …</p>
17
18<pre><code> do -></code></pre>
19
20<p>… nested block.</p>
21
22<pre><code> ok yes</code></pre>
23
24<p>Code must be separated from text by a blank line.</p>
25
26<pre><code>test "code blocks must be preceded by a blank line", -></code></pre>
27
28<p>The next line is part of the text and will not be executed. fail()</p>
29
30<pre><code> ok yes</code></pre>
31
32<p>Code in <code>backticks is not parsed</code> and…</p>
33
34<pre><code>test "comments in indented blocks work", ->
35 do ->
36 do ->
37 # Regular comment.
38
39 ###
40 Block comment.
41 ###
42
43 ok yes</code></pre>
44
45<p>Regular <a href='http://example.com/markdown'>Markdown</a> features, like links and unordered lists, are fine:</p>
46
47<p>* I</p>
48
49<p>* Am</p>
50
51<p>* A</p>
52
53<p>* List</p>
54
55<p>Tabs work too:</p>
56
57<p>test “tabbed code”, -> ok yes</p>