diff --git a/static/js/terminal/index.js b/static/js/terminal/index.js index e609d23..bbfe2de 100644 --- a/static/js/terminal/index.js +++ b/static/js/terminal/index.js @@ -1057,11 +1057,13 @@ AnsiTerminal.prototype.toString = function (type){ style = htmlStyle(styleBuffer); s += ''; attrCache = node.attr; - } else if (j === cols - 1) { + } else if (j === cols) { s += ''; } if (node.value) { + console.log(node, styles(node).foreground); + if (node.attr !== attrCache) { style = htmlStyle(styleBuffer); s += ''; @@ -1073,6 +1075,7 @@ AnsiTerminal.prototype.toString = function (type){ } s += ''; + stylesBuffer[i][j] = styleBuffer; } this.stylesBuffer = stylesBuffer;