mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-26 22:53:58 +00:00
doc parser should recognize the 'defaults' syntax for params
This commit is contained in:
parent
96abeb1074
commit
a8efd43d25
2 changed files with 6 additions and 6 deletions
|
|
@ -113,13 +113,13 @@ var TAG = {
|
||||||
param: function(doc, name, value){
|
param: function(doc, name, value){
|
||||||
doc.param = doc.param || [];
|
doc.param = doc.param || [];
|
||||||
doc.paramRest = doc.paramRest || [];
|
doc.paramRest = doc.paramRest || [];
|
||||||
var match = value.match(/^({([^\s=]+)(=([^\s]+))?}\s*)?([^\s]+)\s*(.*)/);
|
var match = value.match(/^({([^\s=]+)(=)?}\s*)?([^\s]+|\[(\S+)+=([^\]]+)\])\s+(.*)/);
|
||||||
if (match) {
|
if (match) {
|
||||||
var param = {
|
var param = {
|
||||||
type: match[2],
|
type: match[2],
|
||||||
'default':match[4],
|
name: match[4] || match[5],
|
||||||
name: match[5],
|
'default':match[6],
|
||||||
description:match[6]};
|
description:match[7]};
|
||||||
doc.param.push(param);
|
doc.param.push(param);
|
||||||
if (!doc.paramFirst) {
|
if (!doc.paramFirst) {
|
||||||
doc.paramFirst = param;
|
doc.paramFirst = param;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ angularFilter.currency = function(amount){
|
||||||
* If the input is not a number empty string is returned.
|
* If the input is not a number empty string is returned.
|
||||||
*
|
*
|
||||||
* @param {(number|string)} number Number to format.
|
* @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.
|
* @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
|
|
@ -287,7 +287,7 @@ angularFilter.uppercase = uppercase;
|
||||||
* filtered and you can't get the content through the sanitizer.
|
* filtered and you can't get the content through the sanitizer.
|
||||||
*
|
*
|
||||||
* @param {string} html Html input.
|
* @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.
|
* @returns {string} Sanitized or raw html.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue