mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
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.
This commit is contained in:
parent
b2d63ac48b
commit
beeb5ff908
1 changed files with 2 additions and 1 deletions
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Reference in a new issue