summaryrefslogtreecommitdiff
path: root/js/matrix.js
diff options
context:
space:
mode:
authorJulie Lala <jules@okfoc.us>2014-11-30 16:53:50 -0500
committerJulie Lala <jules@okfoc.us>2014-11-30 16:53:50 -0500
commit7d80be2bf7bfb65719dff6437959509e12487078 (patch)
tree9f9a0455bae61f165d3ad98a2fb624edcee9458f /js/matrix.js
parent4f2f5dc5580359bba21150af3ce5d34ad14b3ab4 (diff)
import ascii art
Diffstat (limited to 'js/matrix.js')
-rw-r--r--js/matrix.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/js/matrix.js b/js/matrix.js
index 81ced3e..96421ff 100644
--- a/js/matrix.js
+++ b/js/matrix.js
@@ -114,10 +114,15 @@ Matrix.prototype.mirc = function () {
Matrix.prototype.irssi = function(){
var txt = this.mirc()
.replace(/\%/g, '%%')
+ .replace(/\\/g, '\\')
.replace(/\"/g, '\\\"')
+ .replace(/\'/g, '\\\'')
.replace(/\`/g, '\\\`')
- .replace(/\\n/g, '\\n')
- .replace(/\x03/g, '\\x03')
+ .replace(/\s+\n/g, '\n')
+ .replace(/\s+$/g, '\n')
+ .replace(/\n/g, '\\n')
+ .replace(/\x03/g, '\\x03');
+ console.log(txt)
return '/exec -out printf "' + txt + '"\n'
}
Matrix.prototype.expand = function(i){