Skip to content

Commit 0c8b5f4

Browse files
committed
Improve d.ts comments generation
Add trimright in the comments, because there are a lot of comments with useless whitespaces.
1 parent 6c7da59 commit 0c8b5f4

3 files changed

Lines changed: 182 additions & 182 deletions

File tree

tasks/buildtsdoc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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] + "\r\n";
62+
comment += this.repeatSpaces(nbSpaces) + "* " + commentLines[j].trimRight() + "\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);

0 commit comments

Comments
 (0)