Move serialisation to correct place
This commit is contained in:
parent
085dcd326b
commit
860597cf05
1 changed files with 2 additions and 2 deletions
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
(defn pr-code [code-str]
|
(defn pr-code [code-str]
|
||||||
(let [s (pr-str (str "#_CODE_" code-str "#_CODE_"))]
|
(let [s (pr-str (str "#_CODE_" code-str "#_CODE_"))]
|
||||||
(subs s 1 (dec (count s)))))
|
(str "\"" (subs s 1 (dec (count s))) "\"")))
|
||||||
|
|
||||||
(defn read-code [code]
|
(defn read-code [code]
|
||||||
(read-string (str "\"" code "\"")))
|
(read-string (str "\"" code "\"")))
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
(str "javascript:(function(){"
|
(str "javascript:(function(){"
|
||||||
"var runCode = function() {
|
"var runCode = function() {
|
||||||
try {
|
try {
|
||||||
scittle.core.eval_string(\"" (pr-code code-str) "\")
|
scittle.core.eval_string(" (pr-code code-str) ")
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('Error in code', error);
|
console.log('Error in code', error);
|
||||||
alert('Error running code, see console')
|
alert('Error running code, see console')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue