Skip to content

Commit

Permalink
Fixed bug with BorderStyle.NoneNoGap
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiah-shaulov committed Oct 19, 2022
1 parent aa09b60 commit e835974
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Can work on text that contains terminal escape sequences.
## Indent

```ts
import {indentAndWrap} from 'https://deno.land/x/indent_and_wrap@v0.0.16/mod.ts';
import {indentAndWrap} from 'https://deno.land/x/indent_and_wrap@v0.0.17/mod.ts';

console.log
( indentAndWrap
Expand All @@ -30,7 +30,7 @@ Result:
## Text table

```ts
import {textTable, BorderStyle, TextAlign} from 'https://deno.land/x/indent_and_wrap@v0.0.16/mod.ts';
import {textTable, BorderStyle, TextAlign} from 'https://deno.land/x/indent_and_wrap@v0.0.17/mod.ts';

console.log
( textTable
Expand Down Expand Up @@ -67,7 +67,7 @@ Result:
## Complex layout

```ts
import {textTable, TextTable, BorderStyle, TextAlign} from 'https://deno.land/x/indent_and_wrap@v0.0.16/mod.ts';
import {textTable, TextTable, BorderStyle, TextAlign} from 'https://deno.land/x/indent_and_wrap@v0.0.17/mod.ts';

console.log
( textTable
Expand Down
4 changes: 2 additions & 2 deletions private/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,11 @@ export class TextTable

let nLines = tableHeight;
let nColumns = tableWidth;
if (this.#borderStyle)
if (this.#borderStyle > BorderStyle.None)
{ nLines += rowHeights.length + 1;
nColumns += columnWidths.length + 1;
}
else
else if (this.#borderStyle != BorderStyle.NoneNoGap)
{ nColumns += columnWidths.length - 1;
}

Expand Down

0 comments on commit e835974

Please sign in to comment.