File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ var TypeScriptDocGenerator = (function () {
5959 var startLinePosition = this . lineMap . getLineStartPosition ( lc . line ( ) ) ;
6060 var comment = "\r\n" + this . repeatSpaces ( nbSpaces ) + "/**\r\n" ;
6161 for ( var j = 0 ; j < commentLines . length ; j ++ ) {
62- comment += this . repeatSpaces ( nbSpaces ) + "* " + commentLines [ j ] . trim ( ) + "\r\n" ;
62+ comment += this . repeatSpaces ( nbSpaces ) + "* " + commentLines [ j ] + "\r\n" ;
6363 }
6464 comment += this . repeatSpaces ( nbSpaces ) + "*/\r\n" ;
6565 this . tsDefFileContent = this . tsDefFileContent . substr ( 0 , startLinePosition + this . nbCharsAdded ) + comment + this . tsDefFileContent . substr ( startLinePosition + this . nbCharsAdded ) ;
@@ -175,7 +175,7 @@ var TypeScriptDocGenerator = (function () {
175175 }
176176
177177 }
178- if ( f . returns != null ) {
178+ if ( ( f . returns != null ) && ( f . returns . description . trim ( ) . length > 0 ) ) {
179179 var returnComments = this . cleanEndLine ( f . returns . description ) . split ( "\n" ) ;
180180 for ( var l = 0 ; l < returnComments . length ; l ++ ) {
181181 if ( l === 0 ) {
You can’t perform that action at this time.
0 commit comments