-
-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
Consider the following code:
import { table } from "table";
console.log(
table([
["abc", "abc", " "],
[" ", "abc", " "],
[" ", "abc", " "],
[" ", "abc", "abc"],
],
{
spanningCells: [
{ row: 0, col: 0, rowSpan: 4 },
{ row: 0, col: 1, colSpan: 2 },
{ row: 1, col: 1, colSpan: 2 },
{ row: 2, col: 1, colSpan: 2 },
],
columns: {
0: { width: 3 },
1: { width: 3 },
2: { width: 3 },
},
drawHorizontalLine: (row) => [0, 3, 4].includes(row)
})
);Actual output:
╔═════╤═══════════╗
║ abc │ abc ║
║ │ abc ║
║ │ abc ║
║├─────┬─────╢
║ │ abc │ abc ║
╚═════╧═════╧═════╝
Expectation:
╔═════╤═══════════╗
║ abc │ abc ║
║ │ abc ║
║ │ abc ║
║ ├─────┬─────╢
║ │ abc │ abc ║
╚═════╧═════╧═════╝
Metadata
Metadata
Assignees
Labels
No labels