Skip to content

Commit 02e5550

Browse files
committed
make top lines prettier
1 parent ddc90c6 commit 02e5550

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

prettytable.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ PrettyTable.prototype.toString = function () {
4949

5050
// Draw a line based on the max width of each column and return
5151
var drawLine = function (table) {
52-
var arrayLength = 0;
52+
var finalLine = '+';
5353
for (var i = 0; i < table.maxWidth.length; i++) {
54-
arrayLength += table.maxWidth[i];
54+
finalLine += Array(table.maxWidth[i] + 3).join('-') + '+';
5555
}
56-
return '+' + Array(arrayLength + table.maxWidth.length * 3).join('-') + '+';
56+
return finalLine;
5757
};
5858

5959
// If no columns present, return empty string

0 commit comments

Comments
 (0)