Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9ec09c3

Browse files
authored
Build: Fix the regex parsing AMD var-modules (#4389)
The previous regex caused the final jQuery binary to have syntax errors forvar-modules with names starting with "return". For example, the following modulewouldn't work when the file is named `returnTrue.js`:```jsdefine( function() {"use strict";return function returnTrue() {return true;};} );```Closesgh-4389
1 parent3527a38 commit9ec09c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎build/tasks/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ module.exports = function( grunt ) {
6565
if(/.\/var\//.test(path.replace(process.cwd(),""))){
6666
contents=contents
6767
.replace(
68-
/define\([\w\W]*?return/,
68+
/define\(\s*(["'])[\w\W]*?\1[\w\W]*?return/,
6969
"var "+
7070
(/var\/([\w-]+)/.exec(name)[1])+
7171
" ="

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp