|
@@ -170,6 +170,10 @@ export class DOMConsole {
|
|
|
this.anyKey = false;
|
|
|
}
|
|
|
|
|
|
+ writeRawHTML (text, channel) {
|
|
|
+ this._appendTextLn(text, channel, false);
|
|
|
+ }
|
|
|
+
|
|
|
write (text, newLine = false) {
|
|
|
this._appendText(text, DOMConsole.USER, newLine);
|
|
|
}
|
|
@@ -183,6 +187,7 @@ export class DOMConsole {
|
|
|
}
|
|
|
|
|
|
async _appendText (text, type, newLine = false) {
|
|
|
+ console.debug('Caling appendText');
|
|
|
const write_time = Date.now();
|
|
|
this.pending_writes.push(0);
|
|
|
await Utils.sleep(5);
|
|
@@ -190,7 +195,7 @@ export class DOMConsole {
|
|
|
if (this.last_clear >= write_time) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (this.currentLine == null) {
|
|
|
const divClass = this.getClassForType(type);
|
|
|
const textDiv = document.createElement('div');
|
|
@@ -367,9 +372,12 @@ export class DOMConsole {
|
|
|
let t = outputList[i];
|
|
|
t = t.replace(/\t/g,'  ');
|
|
|
t = t.replace(/\s/g," ");
|
|
|
- if (t.length == 0)
|
|
|
- t = " "
|
|
|
- this.write(t, true);
|
|
|
+ if (t.length == 0) {
|
|
|
+
|
|
|
+ console.debug('Empty string');
|
|
|
+ this.currentLine = null;
|
|
|
+ } else
|
|
|
+ this.write(t, true);
|
|
|
}
|
|
|
let t = outputList[i];
|
|
|
t = t.replace(/\t/g,'  ');
|
|
@@ -382,7 +390,7 @@ export class DOMConsole {
|
|
|
output = output.replace(/\s/g," ");
|
|
|
this.write(output);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
clearPendingWrites () {
|