Don't filter shebangs when using the 'some' comment filter

Also clarify documentation a bit more about using regexp as filter
This commit is contained in:
Anthony Van de Gejuchte
2016-10-16 20:57:28 +02:00
committed by Richard van Velzen
parent 266ddd9639
commit 8d74f34373
4 changed files with 12 additions and 5 deletions

View File

@@ -57,4 +57,9 @@ describe("comment filters", function() {
assert.strictEqual(ast.print_to_string({comments: f}), "#!Random comment\n//test1\n/*test2*/\n");
});
it("Should never be able to filter comment5 when using 'some' as filter", function() {
var ast = UglifyJS.parse("#!foo\n//foo\n/*@preserve*/\n/* please hide me */");
assert.strictEqual(ast.print_to_string({comments: "some"}), "#!foo\n/*@preserve*/\n");
});
});