From 63a577aa0bcb439c1730c3825407d86c128b17be Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Tue, 16 Jun 2015 11:24:21 -0400 Subject: [PATCH] Build: space between curly and paren is optional Fixes gh-2399 Close gh-2400 --- build/tasks/build.js | 4 ++-- 1 file 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, "" ); -- 2.39.5