Comparing version 6.0.0 to 6.0.1
@@ -18,3 +18,3 @@ "use strict"; | ||
constructor() { | ||
this.VERSION = "6.0.0"; | ||
this.VERSION = "6.0.1"; | ||
this.setup_palettes(); | ||
@@ -303,2 +303,3 @@ this._use_classes = false; | ||
this.faint = false; | ||
this.bold = false; | ||
} | ||
@@ -305,0 +306,0 @@ else if (num === 23) { |
@@ -56,3 +56,3 @@ /* ansi_up.js | ||
{ | ||
VERSION = "6.0.0"; | ||
VERSION = "6.0.1"; | ||
@@ -630,3 +630,3 @@ // | ||
} else if (num === 21) { this.bold = false; | ||
} else if (num === 22) { this.faint = false; | ||
} else if (num === 22) { this.faint = false; this.bold = false; | ||
} else if (num === 23) { this.italic = false; | ||
@@ -633,0 +633,0 @@ } else if (num === 24) { this.underline = false; |
{ | ||
"name": "ansi_up", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "Convert ansi sequences in strings to colorful HTML", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -288,2 +288,51 @@ | ||
it('should reset a bold attr to html', function () { | ||
var attr = 1; | ||
var fg = 32; | ||
var start = "\x1B[" + attr + ";" + fg + ";21m " + attr + ";" + fg + " \x1B[0m"; | ||
var expected = "<span style=\"color:rgb(0,187,0)\"> " + attr + ";" + fg + " </span>"; | ||
var au = new AnsiUp(); | ||
var l = au.ansi_to_html(start); | ||
l.should.eql(expected); | ||
}); | ||
it('should reset a faint attr to html', function () { | ||
var attr = 2; | ||
var fg = 32; | ||
var start = "\x1B[" + attr + ";" + fg + ";22m " + attr + ";" + fg + " \x1B[0m"; | ||
var expected = "<span style=\"color:rgb(0,187,0)\"> " + attr + ";" + fg + " </span>"; | ||
var au = new AnsiUp(); | ||
var l = au.ansi_to_html(start); | ||
l.should.eql(expected); | ||
}); | ||
it('should reset a bold and faint attr to just faint html', function () { | ||
var attr = "1;2"; | ||
var fg = 32; | ||
var start = "\x1B[" + attr + ";" + fg + ";21m " + attr + ";" + fg + " \x1B[0m"; | ||
var expected = "<span style=\"opacity:0.7;color:rgb(0,187,0)\"> " + attr + ";" + fg + " </span>"; | ||
var au = new AnsiUp(); | ||
var l = au.ansi_to_html(start); | ||
l.should.eql(expected); | ||
}); | ||
it('should reset a bold and faint attr to just html', function () { | ||
var attr = "1;2"; | ||
var fg = 32; | ||
var start = "\x1B[" + attr + ";" + fg + ";22m " + attr + ";" + fg + " \x1B[0m"; | ||
var expected = "<span style=\"color:rgb(0,187,0)\"> " + attr + ";" + fg + " </span>"; | ||
var au = new AnsiUp(); | ||
var l = au.ansi_to_html(start); | ||
l.should.eql(expected); | ||
}); | ||
it('should transform an italic attr;foreground to html', function () { | ||
@@ -290,0 +339,0 @@ var attr = 3; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
244529
2207