, prefix in the REPL to compile
authorDavid Vazquez <davazp@gmail.com>
Sat, 22 Dec 2012 15:48:16 +0000 (15:48 +0000)
committerDavid Vazquez <davazp@gmail.com>
Sat, 22 Dec 2012 15:48:16 +0000 (15:48 +0000)
test.html

index 322ccbf..c8cb256 100644 (file)
--- a/test.html
+++ b/test.html
           // Start the prompt with history enabled.
           jqconsole.Prompt(true, function (input) {
             // Output input with the class jqconsole-output.
-            if (input[0] == ',')
+            if (input[0] != ','){
                 jqconsole.Write(JSON.stringify(lisp.evalString(input)) + '\n', 'jqconsole-output');
-                jqconsole.Write(JSON.stringify(lisp.compileString(input)) + '\n', 'jqconsole-output');
+            } else {
+                jqconsole.Write(JSON.stringify(lisp.compileString(input.slice(0))) + '\n', 'jqconsole-output');
+            }
             // Restart the prompt.
             startPrompt();
           });