aboutsummaryrefslogtreecommitdiff
path: root/js/reader.js
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-06 16:40:55 -0500
committerJoel Martin <github@martintribe.org>2014-04-06 16:40:55 -0500
commit31b4416181158b0e49e0a09da8056298b8522ba2 (patch)
tree39ca29f0841823cb8208a93ff59c942466457934 /js/reader.js
parentb079f51028571bc603b8d43761c29ff56273bffc (diff)
downloadmal-31b4416181158b0e49e0a09da8056298b8522ba2.tar.gz
mal-31b4416181158b0e49e0a09da8056298b8522ba2.zip
JS: fix web interface.
Diffstat (limited to 'js/reader.js')
-rw-r--r--js/reader.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/reader.js b/js/reader.js
index f19010d..3f2f6ca 100644
--- a/js/reader.js
+++ b/js/reader.js
@@ -32,7 +32,9 @@ function read_atom (reader) {
} else if (token.match(/^-?[0-9][0-9.]*$/)) {
return parseFloat(token,10); // float
} else if (token[0] === "\"") {
- return token.slice(1,token.length-1).replace(/\\"/g, '"'); // string
+ return token.slice(1,token.length-1)
+ .replace(/\\"/g, '"')
+ .replace(/\\n/g, "\n"); // string
} else if (token === "nil") {
return null;
} else if (token === "true") {