Skip to content

Commit ffbae44

Browse files
committed
Merge pull request satyr#4 from josher19/patch-2
Merge pull request satyr#4 from josher19/patch-2
2 parents ddec6d4 + 0c3fa04 commit ffbae44

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ <h5>LiveScript</h5>
203203
"The answer is #{2 + 2}"
204204

205205
# Variables can be interpolated without the braces
206+
variable = "world"
206207
"Hello #variable"
207208

208209
## Objects - braces are optional
@@ -474,7 +475,10 @@ <h2>Changes from Coco: Detail and Rationale</h2>
474475
catch e
475476
e.message
476477
if action is \run
477-
result = eval result
478+
try
479+
result = eval result
480+
catch e
481+
result = e
478482
if result
479483
console?.log result
480484
result = JSON.stringify result if action in <[ lex tokens ]>
@@ -483,7 +487,7 @@ <h2>Changes from Coco: Detail and Rationale</h2>
483487
if action is \compile
484488
result = prettyPrintOne result, 'lang-js', false
485489
$ '.compiler-output' .prepend """<div>
486-
<h3>#action<a href="#close" class="close" title="Close" >&times;</a></h3>
490+
<h3>#action<a href="\#close" class="close" title="Close" >&times;</a></h3>
487491
<pre class="prettyprint lang-js">#result</pre>
488492
</div>"""
489493

0 commit comments

Comments
 (0)