Comparing version 0.2.1 to 0.2.2
@@ -106,6 +106,3 @@ 'use strict'; | ||
if (!isHtml && (symbol === '\'' || symbol === '"' || symbol === '`')) { | ||
var closeIdx = idx; | ||
do { | ||
closeIdx = text.indexOf(symbol, closeIdx + 1); | ||
} while (closeIdx > 0 && text[closeIdx - 1] === '\\'); | ||
var closeIdx = text.indexOf(symbol, idx + 1); | ||
if (isInsideRegEx()) { | ||
@@ -112,0 +109,0 @@ continue; |
{ | ||
"name": "decomment", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Removes comments from JSON, JavaScript, CSS and HTML.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,2 +11,9 @@ 'use strict'; | ||
describe("special slash case", function () { | ||
it("must be ignored", function () { | ||
expect(decomment("'\\'")).toBe("'\\'"); | ||
expect(decomment("'\\\\'")).toBe("'\\\\'"); | ||
}); | ||
}); | ||
describe("single-line gaps", function () { | ||
@@ -13,0 +20,0 @@ it("must be removed", function () { |
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
21250
491