From 7d80be2bf7bfb65719dff6437959509e12487078 Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Sun, 30 Nov 2014 16:53:50 -0500 Subject: import ascii art --- js/matrix.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'js/matrix.js') 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){ -- cgit v1.2.3-70-g09d2