From 66fb77b9b508e8fd1794e335b460d44032037bb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Tue, 27 Aug 2019 07:59:35 +0200 Subject: [PATCH] assets/js/matrix.js:Matrix.prototype.{ansi,mirc}(): only reset {bg,fg}_ when processing a new row vs. new cell (via spoke.) --- assets/js/matrix.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/assets/js/matrix.js b/assets/js/matrix.js index c77627c..1ecc101 100644 --- a/assets/js/matrix.js +++ b/assets/js/matrix.js @@ -241,9 +241,8 @@ Matrix.prototype.ascii = function () { } Matrix.prototype.ansi = function (opts) { var lines = this.aa.map(function(row, y){ - var last, line = "" + var last, line = "", bg_ = -1, fg_ = -1 row.forEach(function(lex, x) { - var bg_ = -1, fg_ = -1 if (lex.eqColor(last)) { line += lex.sanitize() } @@ -262,9 +261,8 @@ Matrix.prototype.ansi = function (opts) { Matrix.prototype.mirc = function (opts) { var cutoff = false var lines = this.aa.map(function(row, y){ - var last, line = "" + var last, line = "", bg_ = -1, fg_ = -1 row.forEach(function(lex, x) { - var bg_ = -1, fg_ = -1 if (lex.eqColor(last)) { line += lex.sanitize() }