]> 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)
committerOleg Gaidarenko <markelog@gmail.com>
Mon, 7 Sep 2015 17:14:59 +0000 (20:14 +0300)
Ref 63a577aa0bcb439c1730c3825407d86c128b17be
Fixes gh-2399
Close gh-2400

build/tasks/build.js

index 5ddba17df8229584492282d21e86d9b15cc2c8ff..2a66fadbb39e7769639ceeaf287ff72aa437630a 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",
@@ -68,7 +68,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, "" );