File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ if (codeboltChild && codeboltChild.children) {
87
87
"cbparameters" : {
88
88
"parameters" : [ ] ,
89
89
"returns" : {
90
- "signatureTypeName" : " "
90
+ "signatureTypeName" : " " ,
91
+ "description" : " "
91
92
}
92
93
}
93
94
}
@@ -107,7 +108,15 @@ if (codeboltChild && codeboltChild.children) {
107
108
frontMatterVars . data . category = CbProperties . name ;
108
109
frontMatterVars . data . name = CbFunctions . name ;
109
110
frontMatterVars . cbbaseinfo . description = CbFunctions . comment && CbFunctions . comment . summary && CbFunctions . comment . summary . length > 0 ? CbFunctions . comment . summary [ 0 ] . text : ' ' ;
110
-
111
+
112
+
113
+ if ( CbFunctions . comment && CbFunctions . comment . blockTags ) {
114
+ CbFunctions . comment . blockTags . forEach ( blockTag => {
115
+ if ( blockTag . tag === "@returns" ) {
116
+ frontMatterVars . cbparameters . returns . description = blockTag . content && blockTag . content . length > 0 ? blockTag . content [ 0 ] . text : ' ' ;
117
+ }
118
+ } ) ;
119
+ }
111
120
112
121
if ( CbFunctions . type && CbFunctions . type . declaration && CbFunctions . type . declaration . signatures ) {
113
122
CbFunctions . type . declaration . signatures . forEach ( signature => {
@@ -116,7 +125,7 @@ if (codeboltChild && codeboltChild.children) {
116
125
parameterObj = {
117
126
"name" : param . name ,
118
127
"typeName" : param . type . name ,
119
- "description" : param . comment && param . comment . text && param . comment . text . length > 0 ? param . comment . text [ 0 ] . text :''
128
+ "description" : param . comment && param . comment . summary && param . comment . summary . length > 0 ? param . comment . summary [ 0 ] . text :''
120
129
}
121
130
frontMatterVars . cbparameters . parameters . push ( parameterObj ) ;
122
131
} ) ;
You can’t perform that action at this time.
0 commit comments