aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2015-06-16 11:24:21 -0400
committerTimmy Willison <timmywillisn@gmail.com>2015-06-19 13:40:11 -0400
commit63a577aa0bcb439c1730c3825407d86c128b17be (patch)
tree9f9e5df5d3f5b96c8cee6ed2aff132a7a086e738 /build
parent842958e7aecd0d75a7ee9e2aaec83457701aa2f3 (diff)
downloadjquery-63a577aa0bcb439c1730c3825407d86c128b17be.tar.gz
jquery-63a577aa0bcb439c1730c3825407d86c128b17be.zip
Build: space between curly and paren is optional
Fixes gh-2399 Close gh-2400
Diffstat (limited to 'build')
-rw-r--r--build/tasks/build.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/build/tasks/build.js b/build/tasks/build.js
index f59a3340b..ead3deb19 100644
--- a/build/tasks/build.js
+++ b/build/tasks/build.js
@@ -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, "" );