File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,7 +121,15 @@ var TypeScriptDocGenerator = (function () {
121121 if ( ( p . default != null ) && ( p . default !== "" ) ) {
122122 def = " - Default: " + p . default ;
123123 }
124- comments . push ( "@param " + p . name + " - " + p . description + def ) ;
124+ var paramComments = p . description . split ( "\n" ) ;
125+ for ( var k = 0 ; k < paramComments . length ; k ++ ) {
126+ if ( k === 0 ) {
127+ comments . push ( "@param " + p . name + " " + paramComments [ k ] . trim ( ) + ( ( k === paramComments . length - 1 ) ? def : "" ) ) ;
128+ }
129+ else {
130+ comments . push ( this . repeatSpaces ( ( "@param " + p . name + " " ) . length ) + paramComments [ k ] . trim ( ) + ( ( k === paramComments . length - 1 ) ? def : "" ) ) ;
131+ }
132+ }
125133 }
126134 return comments ;
127135 }
@@ -149,10 +157,23 @@ var TypeScriptDocGenerator = (function () {
149157 if ( ( p . default != null ) && ( p . default !== "" ) ) {
150158 def = " - Default: " + p . default ;
151159 }
152- comments . push ( "@param " + p . name + " - " + p . description + def ) ;
160+
161+ var paramComments = p . description . split ( "\n" ) ;
162+ for ( var k = 0 ; k < paramComments . length ; k ++ )
163+ {
164+ if ( k === 0 )
165+ {
166+ comments . push ( "@param " + p . name + " " + paramComments [ k ] . trim ( ) + ( ( k === paramComments . length - 1 ) ? def : "" ) ) ;
167+ }
168+ else
169+ {
170+ comments . push ( this . repeatSpaces ( ( "@param " + p . name + " " ) . length ) + paramComments [ k ] . trim ( ) + ( ( k === paramComments . length - 1 ) ? def : "" ) ) ;
171+ }
172+ }
173+
153174 }
154175 if ( f . returns != null ) {
155- comments . push ( "@return - " + f . returns . description ) ;
176+ comments . push ( "@return " + f . returns . description ) ;
156177 }
157178 return comments ;
158179 }
You can’t perform that action at this time.
0 commit comments