mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Make previous build.js regexp simplification non-greedy.
Former-commit-id: e58cfb5e5143e12721bb08445dfd4a6fec119cd1
This commit is contained in:
4
build.js
4
build.js
@@ -251,9 +251,9 @@
|
|||||||
// match a function declaration
|
// match a function declaration
|
||||||
'( +)function ' + funcName + '\\b[\\s\\S]+?\\n\\1}|' +
|
'( +)function ' + funcName + '\\b[\\s\\S]+?\\n\\1}|' +
|
||||||
// match a variable declaration with `createIterator`
|
// match a variable declaration with `createIterator`
|
||||||
' +var ' + funcName + ' *=.*createIterator\\((?:{|[a-zA-Z])[\\s\\S]+?\\);|' +
|
' +var ' + funcName + ' *=.*?createIterator\\((?:{|[a-zA-Z])[\\s\\S]+?\\);|' +
|
||||||
// match a variable declaration with function expression
|
// match a variable declaration with function expression
|
||||||
'( +)var ' + funcName + ' *=.*function[\\s\\S]+?\\n\\2};' +
|
'( +)var ' + funcName + ' *=.*?function[\\s\\S]+?\\n\\2};' +
|
||||||
// end non-capturing group
|
// end non-capturing group
|
||||||
')\\n'
|
')\\n'
|
||||||
));
|
));
|
||||||
|
|||||||
Reference in New Issue
Block a user