From 5d2928d2b3f73af9c23bf87d3bcbec8e9f760ea8 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 31 May 2012 22:54:37 -0600 Subject: [PATCH] Simplify regexps in build.js. Former-commit-id: 7640f90b6aeca0438579c15c9eef270904c2c523 --- build.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.js b/build.js index f065158c6..b5a1b0515 100755 --- a/build.js +++ b/build.js @@ -251,9 +251,9 @@ // match a function declaration '( +)function ' + funcName + '\\b[\\s\\S]+?\\n\\1}|' + // match a variable declaration with `createIterator` - ' +var ' + funcName + ' *= *(?:[a-zA-Z]+ *\\|\\| *)?createIterator\\((?:{|[a-zA-Z])[\\s\\S]+?\\);|' + + ' +var ' + funcName + ' *=.*createIterator\\((?:{|[a-zA-Z])[\\s\\S]+?\\);|' + // match a variable declaration with function expression - '( +)var ' + funcName + ' *= *(?:[a-zA-Z]+ *\\|\\| *)?function[\\s\\S]+?\\n\\2};' + + '( +)var ' + funcName + ' *=.*function[\\s\\S]+?\\n\\2};' + // end non-capturing group ')\\n' )); @@ -484,7 +484,7 @@ } // remove pseudo private properties - source = source.replace(/(?:\s*\/\/.*)*\s*lodash\._[^=]+=.+\n/g, '\n'); + source = source.replace(/(?:(?:\s*\/\/.*)*\s*lodash\._[^=]+=.+\n)+/g, '\n'); /*--------------------------------------------------------------------------*/