diff --git a/static/js/terminal/index.js b/static/js/terminal/index.js index 24ab100..e28823c 100644 --- a/static/js/terminal/index.js +++ b/static/js/terminal/index.js @@ -1053,31 +1053,31 @@ AnsiTerminal.prototype.toString = function (type){ stylesBuffer[i][j].value = node.value; } + if (styleBuffer.foreground) { + style += 'color:' + styleBuffer.foreground + ';'; + } + + if (styleBuffer.background) { + style += 'background-color:' + styleBuffer.background + ';'; + } + + if (styleBuffer.bold) { + style += 'font-weight:bold;'; + } + + if (styleBuffer.italic) { + style += 'font-style: italic;'; + } + + if (styleBuffer.underline) { + style += 'text-decoration: underline;'; + } + if (j === 0) { + s += ''; + style = ''; attrCache = node.attr; - - if (styleBuffer.foreground) { - style += 'color:' + styleBuffer.foreground + ';'; - } - - if (styleBuffer.background) { - style += 'background-color:' + styleBuffer.background + ';'; - } - - if (styleBuffer.bold) { - style += 'font-weight:bold;'; - } - - if (styleBuffer.italic) { - style += 'font-style: italic;'; - } - - if (styleBuffer.underline) { - style += 'text-decoration: underline;'; - } - - s += ''; } else if (j === cols - 1) { s += ''; }