Improve d.ts comments generation

Add trimright in the comments, because there are a lot of comments with
useless whitespaces.
This commit is contained in:
vulvulune 2015-01-21 12:05:35 +01:00
parent 6c7da59565
commit 0c8b5f447f
3 changed files with 182 additions and 182 deletions

View file

@ -59,7 +59,7 @@ var TypeScriptDocGenerator = (function () {
var startLinePosition = this.lineMap.getLineStartPosition(lc.line());
var comment = "\r\n" + this.repeatSpaces(nbSpaces) + "/**\r\n";
for (var j = 0; j < commentLines.length; j++) {
comment += this.repeatSpaces(nbSpaces) + "* " + commentLines[j] + "\r\n";
comment += this.repeatSpaces(nbSpaces) + "* " + commentLines[j].trimRight() + "\r\n";
}
comment += this.repeatSpaces(nbSpaces) + "*/\r\n";
this.tsDefFileContent = this.tsDefFileContent.substr(0, startLinePosition + this.nbCharsAdded) + comment + this.tsDefFileContent.substr(startLinePosition + this.nbCharsAdded);