diff options
Diffstat (limited to 'js/lex.js')
| -rw-r--r-- | js/lex.js | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -31,7 +31,12 @@ Lex.prototype.ascii = function(){ return this.char || " " } Lex.prototype.sanitize = function(){ - return this.char == "%" ? '%%' : this.char || " " + switch (this.char) { + case "%": return "%%" + case undefined: + case "": return " " + default: return this.char + } } var fgOnly = false Lex.prototype.mirc = function(){ @@ -42,8 +47,8 @@ Lex.prototype.mirc = function(){ if (fgOnly) { return "\x03" + (this.fg&15) + char } - if (this.bg == 1 && this.fg == 0) { - return char + if ((this.bg&15) < 10) { + return "\x03" + (this.fg&15) + ",0" + (this.bg&15) + char } else { return "\x03" + (this.fg&15) + "," + (this.bg&15) + char |
