We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddc90c6 commit 02e5550Copy full SHA for 02e5550
1 file changed
prettytable.js
@@ -49,11 +49,11 @@ PrettyTable.prototype.toString = function () {
49
50
// Draw a line based on the max width of each column and return
51
var drawLine = function (table) {
52
- var arrayLength = 0;
+ var finalLine = '+';
53
for (var i = 0; i < table.maxWidth.length; i++) {
54
- arrayLength += table.maxWidth[i];
+ finalLine += Array(table.maxWidth[i] + 3).join('-') + '+';
55
}
56
- return '+' + Array(arrayLength + table.maxWidth.length * 3).join('-') + '+';
+ return finalLine;
57
};
58
59
// If no columns present, return empty string
0 commit comments