]> andersk Git - test.git/commitdiff
Bold and underline SGR attributes now utilize CSS.
authorJay Weisskopf <jay@jayschwa.net>
Sun, 1 Jan 2012 09:29:36 +0000 (03:29 -0600)
committerJay Weisskopf <jay@jayschwa.net>
Sun, 1 Jan 2012 12:08:24 +0000 (06:08 -0600)
demo/vt100.js
shellinabox/vt100.js
shellinabox/vt100.jspp

index 81095cef1843672f7b79abacb1b4bbdb40f73f8a..4e99fa8b80566a890f510a9074777cea86509ce3 100644 (file)
@@ -3282,7 +3282,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;
@@ -3295,9 +3295,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;
 };
index 81095cef1843672f7b79abacb1b4bbdb40f73f8a..4e99fa8b80566a890f510a9074777cea86509ce3 100644 (file)
@@ -3282,7 +3282,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;
@@ -3295,9 +3295,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;
 };
index 4529b27f05f85bc2434905b2d581d8ed4622df89..e781f5e340023930a6483262f6b52e371170e456 100755 (executable)
@@ -3282,7 +3282,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;
@@ -3295,9 +3295,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;
 };
This page took 0.081768 seconds and 5 git commands to generate.