From c2b7956557835b1a232a84bdb262a700924a1538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Wed, 16 Sep 2015 13:18:49 +0200 Subject: Bugfix: console must not collapse spaces. --- css/codeq/console.css | 11 +++++++++++ js/codeq/console.js | 2 +- js/prolog.js | 6 +++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/css/codeq/console.css b/css/codeq/console.css index 7d1f6ae..5f721b7 100644 --- a/css/codeq/console.css +++ b/css/codeq/console.css @@ -4,6 +4,17 @@ font-size: medium; word-break: break-all; } +.cq-con-line { + white-space: pre-wrap; + background-color: transparent; + border: none; + color: inherit; + font-family: inherit; + font-size: inherit; + line-height: inherit; + margin: 0; + padding: 0; +} .cq-con-text { } diff --git a/js/codeq/console.js b/js/codeq/console.js index 90b66cd..99c1550 100644 --- a/js/codeq/console.js +++ b/js/codeq/console.js @@ -176,7 +176,7 @@ jq1, jq2, jqCursor; if (!jqLine) { - jqLine = $('
'); + jqLine = $('
');
                     if (lineDescriptor.row == 0) {
                         jqContent.prepend(jqLine);
                     }
diff --git a/js/prolog.js b/js/prolog.js
index ebce9bf..2868830 100644
--- a/js/prolog.js
+++ b/js/prolog.js
@@ -19,12 +19,12 @@
                     promptMode = !t.have_more;
                 }
                 else {
-                    terminal.error(data.message, 'error');
+                    terminal.append(data.message, 'error');
                     promptMode = true;
                 }
                 if (promptMode) {
                     terminal.setLineBuffered();
-                    terminal.append('\n?- ', 'output');
+                    terminal.append('.\n?- ', 'output');
                 }
             },
             tcf = function terminalCommandFailed (error) {
@@ -59,7 +59,7 @@
                 }, problem_id).then(tcs, tcf);
             }
             else {
-                terminal.append('\n');
+                terminal.append('\n', 'input');
                 if (command == ';') {
                     // show next answer
                     return codeq.comms.sendQuery({
-- 
cgit v1.2.1