1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 09:12:28 +01:00

Death to E4X and stuff.

This commit is contained in:
Kris Maglione
2012-11-27 22:57:45 -08:00
parent 6200b08c13
commit a0f0668166
5 changed files with 104 additions and 36 deletions

View File

@@ -665,10 +665,14 @@ var CommandLine = Module("commandline", {
*/
commandOutput: function commandOutput(xml) {
XML.ignoreWhitespace = XML.prettyPrinting = false;
if (this.command)
this.echo(<><div xmlns={XHTML}>:{this.command}</div>&#x0d;{xml}</>, this.HIGHLIGHT_NORMAL, this.FORCE_MULTILINE);
else
if (!this.command)
this.echo(xml, this.HIGHLIGHT_NORMAL, this.FORCE_MULTILINE);
else if (isXML(xml))
this.echo(<><div xmlns={XHTML}>:{this.command}</div>&#x0d;{xml}</>,
this.HIGHLIGHT_NORMAL, this.FORCE_MULTILINE);
else
this.echo([["div", { xmlns: "html" }, ":" + this.command], "\n", xml],
this.HIGHLIGHT_NORMAL, this.FORCE_MULTILINE);
this.command = null;
},
@@ -699,7 +703,7 @@ var CommandLine = Module("commandline", {
let field = this.widgets.active.message.inputField;
if (field.value && !forceSingle && field.editor.rootElement.scrollWidth > field.scrollWidth) {
this.widgets.message = null;
mow.echo(<span highlight="Message">{str}</span>, highlightGroup, true);
mow.echo(["span", { highlight: "Message" }, str], highlightGroup, true);
}
},
@@ -737,7 +741,7 @@ var CommandLine = Module("commandline", {
highlightGroup = highlightGroup || this.HL_NORMAL;
if (flags & this.APPEND_TO_MESSAGES) {
let message = isObject(data) ? data : { message: data };
let message = isObject(data) && !DOM.isJSONXML(data) ? data : { message: data };
// Make sure the memoized message property is an instance property.
message.message;