diff options
| author | Igor Minar | 2010-11-15 22:44:05 -0800 |
|---|---|---|
| committer | Igor Minar | 2010-11-16 14:44:35 -0800 |
| commit | beeb5ff908b2f30465263fb36c58ddb217dc2a0c (patch) | |
| tree | 18000149e8514b0e38ac881dd19e9226d558c366 | |
| parent | b2d63ac48bdc61b5a4afdd10b8485c0c1ab8cdca (diff) | |
| download | angular.js-beeb5ff908b2f30465263fb36c58ddb217dc2a0c.tar.bz2 | |
fix regexp for @param parsing in ng:docs
There is an extra + in the regexp which causes exponential increase in time
needed to parse a @param annotation when the length of default value increases
linearly.
| -rw-r--r-- | docs/collect.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/collect.js b/docs/collect.js index 7ad1630b..80053d34 100644 --- a/docs/collect.js +++ b/docs/collect.js @@ -229,7 +229,8 @@ var TAG = { param: function(doc, name, value){ doc.param = doc.param || []; doc.paramRest = doc.paramRest || []; - var match = value.match(/^({([^\s=]+)(=)?}\s*)?(([^\s=]+)|\[(\S+)+=([^\]]+)\])\s+(.*)/); + var match = value.match(/^({([^\s=]+)(=)?}\s*)?(([^\s=]+)|\[(\S+)=([^\]]+)\])\s+(.*)/); + // 1 2 23 3 1 45 5 6 6 7 7 4 8 8 if (match) { var param = { type: match[2], |
