aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Minar2010-11-03 09:40:26 -0700
committerIgor Minar2010-11-03 09:47:23 -0700
commita8efd43d256e67b954a38eb20438714815442f29 (patch)
tree722c980d2afb32224fb4961272c7a3ee6705f08e
parent96abeb1074ec59ddb727ea8164aa770d972c4a9a (diff)
downloadangular.js-a8efd43d256e67b954a38eb20438714815442f29.tar.bz2
doc parser should recognize the 'defaults' syntax for params
-rw-r--r--docs/collect.js8
-rw-r--r--src/filters.js4
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/collect.js b/docs/collect.js
index a7a22a09..f85f2c6b 100644
--- a/docs/collect.js
+++ b/docs/collect.js
@@ -113,13 +113,13 @@ 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+(.*)/);
if (match) {
var param = {
type: match[2],
- 'default':match[4],
- name: match[5],
- description:match[6]};
+ name: match[4] || match[5],
+ 'default':match[6],
+ description:match[7]};
doc.param.push(param);
if (!doc.paramFirst) {
doc.paramFirst = param;
diff --git a/src/filters.js b/src/filters.js
index 0cff6d56..206da240 100644
--- a/src/filters.js
+++ b/src/filters.js
@@ -43,7 +43,7 @@ angularFilter.currency = function(amount){
* If the input is not a number empty string is returned.
*
* @param {(number|string)} number Number to format.
- * @param {(number|string)=2} fractionSize Number of decimal places to round the number to. Default 2.
+ * @param {(number|string)=} [fractionSize=2] Number of decimal places to round the number to. Default 2.
* @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit.
*
* @example
@@ -287,7 +287,7 @@ angularFilter.uppercase = uppercase;
* filtered and you can't get the content through the sanitizer.
*
* @param {string} html Html input.
- * @param {string='safe'} option If 'unsafe' then do not sanitize the HTML input.
+ * @param {string=} option If 'unsafe' then do not sanitize the HTML input.
* @returns {string} Sanitized or raw html.
*
* @example