Skip to content

Commit

Permalink
Don't collapse newlines after 'continue'
Browse files Browse the repository at this point in the history
Fixes #178
  • Loading branch information
matthiasmullie committed Jun 13, 2017
1 parent 563651c commit 09b83e9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
1 change: 0 additions & 1 deletion data/js/keywords_before.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ typeof
extends
package
private
continue
function
protected
implements
Expand Down
20 changes: 20 additions & 0 deletions tests/js/JSTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,26 @@ function otherFuncName() {
'label=input.val().replace(/\\\\/g,\'/\').replace(/.*\//,\'\')',
);

// https://github.com/matthiasmullie/minify/issues/178
$tests[] = array(
'lunr.SortedSet.prototype.add = function () {
var i, element
for (i = 0; i < arguments.length; i++) {
element = arguments[i]
if (~this.indexOf(element)) continue
this.elements.splice(this.locationFor(element), 0, element)
}
this.length = this.elements.length
}',
'lunr.SortedSet.prototype.add=function(){var i,element
for(i=0;i<arguments.length;i++){element=arguments[i]
if(~this.indexOf(element))continue
this.elements.splice(this.locationFor(element),0,element)}
this.length=this.elements.length}',
);

// known minified files to help doublecheck changes in places not yet
// anticipated in these tests
$files = glob(__DIR__.'/sample/minified/*.js');
Expand Down

0 comments on commit 09b83e9

Please sign in to comment.