]> source.dussan.org Git - jquery.git/commitdiff
Build: space between curly and paren is optional
authorTimmy Willison <timmywillisn@gmail.com>
Tue, 16 Jun 2015 15:24:21 +0000 (11:24 -0400)
committerTimmy Willison <timmywillisn@gmail.com>
Fri, 19 Jun 2015 17:40:11 +0000 (13:40 -0400)
Fixes gh-2399
Close gh-2400

build/tasks/build.js

index f59a3340b8e5c9e4282f347327e216dc2dadeb05..ead3deb19d83ed6166bfc2b4724f81fb2a82b154 100644 (file)
@@ -11,7 +11,7 @@ module.exports = function( grunt ) {
        var fs = require( "fs" ),
                requirejs = require( "requirejs" ),
                srcFolder = __dirname + "/../../src/",
-               rdefineEnd = /\}\);[^}\w]*$/,
+               rdefineEnd = /\}\s*?\);[^}\w]*$/,
                config = {
                        baseUrl: "src",
                        name: "jquery",
@@ -62,7 +62,7 @@ module.exports = function( grunt ) {
                } else {
 
                        contents = contents
-                               .replace( /\s*return\s+[^\}]+(\}\);[^\w\}]*)$/, "$1" )
+                               .replace( /\s*return\s+[^\}]+(\}\s*?\);[^\w\}]*)$/, "$1" )
                                // Multiple exports
                                .replace( /\s*exports\.\w+\s*=\s*\w+;/g, "" );