ni_nitdoc: fixed trailings spaces with empty lines in modified comments
authorAlexandre Terrasa <alexandre@moz-code.org>
Wed, 28 Aug 2013 01:22:27 +0000 (21:22 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 28 Aug 2013 01:22:27 +0000 (21:22 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

share/ni_nitdoc/scripts/github.js

index 89b0ce5..1e932ad 100644 (file)
@@ -800,7 +800,7 @@ function GitHubUI() {
                        for(var i = 0; i < commentLines.length; i++) {\r
                                var line = commentLines[i];\r
                                var tab = location.tabpos > 1 ? "\t" : "";\r
-                               res += tab + "# " + line + "\n";\r
+                               res += tab + (line.length > 0 ? "# " : "#") + line + "\n";\r
                        }\r
                }\r
                // copy lines fron lend to end\r