summaryrefslogtreecommitdiff
path: root/js/lex.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lex.js')
-rw-r--r--js/lex.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/lex.js b/js/lex.js
index 723546a..f235672 100644
--- a/js/lex.js
+++ b/js/lex.js
@@ -19,15 +19,15 @@ Lex.prototype.css = function(){
return "f" + letters[this.fg&15] + "b" + letters[this.bg&15]
}
Lex.prototype.html = function(){
- return this.char == " " ? " " : this.char
+ return this.char == " " ? " " : this.char || " "
}
Lex.prototype.irc = function(){
+ var char = this.char == "%" ? '%%' : this.char || " "
if (this.bg == 1 && this.fg == 0) {
-// return "\\x03" + "," + (this.bg&15) + this.char
- return this.char == "%" ? '%%' : this.char
+ return char
}
else {
- return "\\x03" + (this.fg&15) + "," + (this.bg&15) + (this.char == "%" ? '%%' : this.char)
+ return "\\x03" + (this.fg&15) + "," + (this.bg&15) + char
}
}
Lex.prototype.clone = function (lex){