Subject: | Bug in minification of functions containing only a copyright |
Date: | Tue, 10 Nov 2015 21:34:18 +0000 |
To: | bug-JavaScript-Minifier-XS [...] rt.cpan.org |
From: | Dan Goodliffe <dan [...] randomdan.homeip.net> |
Hi,
I've stumbled into a case where JavaScript-Minifier-XS, whilst awesome,
breaks the javascript.
Given:
function() {
// keep copyright
}
Results in:
function(){// keep copyright}
I've tracked down problem and have attached a test case and patch to
address it by checking the previous node's previous node isn't a line
comment.
There might be a better way... but this seems lightweight and simple.
Kind regards
Dan
--
Dan Goodliffe
dan@randomdan.homeip.net
07970 523693
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.
Message body is not shown because sender requested not to inline it.