Make previous build.js regexp simplification non-greedy.

Former-commit-id: e58cfb5e5143e12721bb08445dfd4a6fec119cd1
This commit is contained in:
John-David Dalton
2012-05-31 23:18:44 -06:00
parent 3313b0aa42
commit 2d03060a0d

View File

@@ -251,9 +251,9 @@
// match a function declaration
'( +)function ' + funcName + '\\b[\\s\\S]+?\\n\\1}|' +
// 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
'( +)var ' + funcName + ' *=.*function[\\s\\S]+?\\n\\2};' +
'( +)var ' + funcName + ' *=.*?function[\\s\\S]+?\\n\\2};' +
// end non-capturing group
')\\n'
));