File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ module.exports = function (getHref) {
26
26
* @param {boolean } short whether to cut the details and make it skimmable
27
27
* @returns {string } formatted parameter representation.
28
28
*/
29
- function formatParameter ( param , short ) {
29
+ formatters . parameter = function ( param , short ) {
30
30
if ( short ) {
31
31
return ( param . type && param . type . type == Syntax . OptionalType ) ?
32
32
'[' + param . name + ']' : param . name ;
33
33
}
34
34
return param . name + ': ' + formatters . type ( param . type ) . replace ( / \n / g, '' ) ;
35
- }
35
+ } ;
36
36
37
37
/**
38
38
* Convert a remark AST to a string of HTML, rerouting links as necessary
@@ -87,7 +87,7 @@ module.exports = function (getHref) {
87
87
formatters . parameters = function ( section , short ) {
88
88
if ( section . params ) {
89
89
return '(' + section . params . map ( function ( param ) {
90
- return formatParameter ( param , short ) ;
90
+ return formatters . parameter ( param , short ) ;
91
91
} ) . join ( ', ' ) + ')' ;
92
92
}
93
93
return '()' ;
You can’t perform that action at this time.
0 commit comments