From 65449410e7ac129c36b382959df43d1931729f68 Mon Sep 17 00:00:00 2001 From: Jay Weisskopf Date: Sun, 1 Jan 2012 03:29:36 -0600 Subject: [PATCH] Bold and underline SGR attributes now utilize CSS. --- demo/vt100.js | 5 +++-- shellinabox/vt100.js | 5 +++-- shellinabox/vt100.jspp | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/demo/vt100.js b/demo/vt100.js index dcecdfe..fe7d6b9 100644 --- a/demo/vt100.js +++ b/demo/vt100.js @@ -3263,7 +3263,7 @@ VT100.prototype.respondSecondaryDA = function() { VT100.prototype.updateStyle = function() { this.style = ''; if (this.attr & 0x0200 /* ATTR_UNDERLINE */) { - this.style = 'text-decoration:underline;'; + this.style = 'text-decoration: underline;'; } var bg = (this.attr >> 4) & 0xF; var fg = this.attr & 0xF; @@ -3276,9 +3276,10 @@ VT100.prototype.updateStyle = function() { fg = 8; // Dark grey } else if (this.attr & 0x0800 /* ATTR_BRIGHT */) { fg |= 8; + this.style = 'font-weight: bold;'; } if (this.attr & 0x1000 /* ATTR_BLINK */) { - bg ^= 8; + this.style = 'text-decoration: blink;'; } this.color = 'ansi' + fg + ' bgAnsi' + bg; }; diff --git a/shellinabox/vt100.js b/shellinabox/vt100.js index dcecdfe..fe7d6b9 100644 --- a/shellinabox/vt100.js +++ b/shellinabox/vt100.js @@ -3263,7 +3263,7 @@ VT100.prototype.respondSecondaryDA = function() { VT100.prototype.updateStyle = function() { this.style = ''; if (this.attr & 0x0200 /* ATTR_UNDERLINE */) { - this.style = 'text-decoration:underline;'; + this.style = 'text-decoration: underline;'; } var bg = (this.attr >> 4) & 0xF; var fg = this.attr & 0xF; @@ -3276,9 +3276,10 @@ VT100.prototype.updateStyle = function() { fg = 8; // Dark grey } else if (this.attr & 0x0800 /* ATTR_BRIGHT */) { fg |= 8; + this.style = 'font-weight: bold;'; } if (this.attr & 0x1000 /* ATTR_BLINK */) { - bg ^= 8; + this.style = 'text-decoration: blink;'; } this.color = 'ansi' + fg + ' bgAnsi' + bg; }; diff --git a/shellinabox/vt100.jspp b/shellinabox/vt100.jspp index 6f3ad86..54473d4 100755 --- a/shellinabox/vt100.jspp +++ b/shellinabox/vt100.jspp @@ -3263,7 +3263,7 @@ VT100.prototype.respondSecondaryDA = function() { VT100.prototype.updateStyle = function() { this.style = ''; if (this.attr & ATTR_UNDERLINE) { - this.style = 'text-decoration:underline;'; + this.style = 'text-decoration: underline;'; } var bg = (this.attr >> 4) & 0xF; var fg = this.attr & 0xF; @@ -3276,9 +3276,10 @@ VT100.prototype.updateStyle = function() { fg = 8; // Dark grey } else if (this.attr & ATTR_BRIGHT) { fg |= 8; + this.style = 'font-weight: bold;'; } if (this.attr & ATTR_BLINK) { - bg ^= 8; + this.style = 'text-decoration: blink;'; } this.color = 'ansi' + fg + ' bgAnsi' + bg; };