resourceloader: Don't add superfluous line breaks and semicolons
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 4 Apr 2014 01:50:54 +0000 (18:50 -0700)
committerKrinkle <krinklemail@gmail.com>
Fri, 4 Apr 2014 20:13:08 +0000 (20:13 +0000)
commitf039edc7d57a2e8d8d381094c363a69dc0dff556
treef372c6c91194ab11746ebd7b115c34b384baa5fd
parent97ea4c659b630c55f1fd496a640d766b98eb4f92
resourceloader: Don't add superfluous line breaks and semicolons

The logic was there but didn't work in practice because, just
like this code does itself, code doesn't usually end in ';'.
Instead it ends in ";\n" (trailing line break at end of file),
or even two line breaks (in case of concatenated scripts where
ResourceLoaderFileModule adds another line break).

This saves off a few bytes that were uselessly added in the
load.php output, like:

...
}( jQuery ) );

;
/**
...

After this:

}( jQuery ) );

/**

The logic to add ;\n is still there, but the logic to not add it
when there already wasn't working (added in I3e8227ddb).

Change-Id: Ie055b37b3419ac6dca6349daf745bc48850fff3e
includes/resourceloader/ResourceLoader.php