Comparing version 0.0.3 to 0.0.4
@@ -61,3 +61,3 @@ module.exports = ansiHTML; | ||
// Replace with markup. | ||
return text.replace(/\033\[(\d+)*m/g, function(match, seq){ | ||
var ret = text.replace(/\033\[(\d+)*m/g, function(match, seq){ | ||
var ot = openTags[seq]; | ||
@@ -83,2 +83,8 @@ if (ot) { | ||
}); | ||
// Make sure tags are closed. | ||
var l = ansiCodes.length; | ||
(l > 0) && (ret += Array(l + 1).join('</span>')); | ||
return ret; | ||
} | ||
@@ -85,0 +91,0 @@ |
{ | ||
"name": "ansi-html", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "An elegant lib that converts the chalked (ANSI) text to HTML.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
45475
156