These blank lines should not - under any circumstances - be here. But I do know why they are...
Tim Starling modified the standard distribution of JSMin[1] in some good and some bad ways. These blank lines are the result of one of these modifications which I find to be misguided. He's basically only compressed horizontal white-space, leaving new line characters in place. The blank lines you see are where the comments used to be.
I have made this point before, clearly upon deaf ears - but I will make it again.
* ResourceLoader has 2 modes. Production and Development (or debug) mode. * Production mode should be as fast as possible for users, period. * Development mode should be as easy as possible for developers, period. * Any attempt to blend the two only serves to diminish the effectiveness of either mode.
If you want a version of the script that has not been compressed add debug=true to the URL or set $wgResourceLoaderDebug = true; in your LocalSettings.php.
This particular change (the "don't delete line breaks" part of r73196) should be reverted, Tim's good changes should be pushed upstream, and we should be using a standard JSMin distribution whenever possible.
- Trevor
[1] http://www.mediawiki.org/w/index.php?title=Special:Code/MediaWiki/author/tst...
On 12/7/10 5:32 AM, jidanni@jidanni.org wrote:
Why so many blank lines in this vector component? $ cat yy set 'http://transgender-taiwan.org/load.php?debug=false&lang=zh-tw&module...' GET $1|perl -nwe 'print " $." if /^$/' $ sh yy # These lines are blank: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 26 27 28 29 32 33 34 37
http://transgender-taiwan.org/load.php?debug=false&lang=zh-tw&module... is affected too.
Yes these aren't meant for human consumption.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l