We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If an entire column contains cells with a colWidth > 1, they don't get a proper width calculation (when colWidths aren't specified).
This can occur in different circumstances.
const Table = require('.'); const table = new Table({ debug: 3 }); table.push([{ colSpan: 2, content: 'I should not be truncated' }]); console.log(table.toString());
Expected:
┌────────────────────────────┐ │ I should not be truncated │ └────────────────────────────┘
Current behavior:
┌───┐ │ … │ └───┘
If a cell above has colSpan, no width is passed down, and a cell below might be truncated when it doesn't need to be. Eg.
const Table = require('.'); const table = new Table(); table.push( [{ content: '0-0 (1x3)', colSpan: 3, rowSpan: 1 }], [ { content: '1-0 (2x2)', colSpan: 2, rowSpan: 2 }, { content: '1-2 (2x1)', colSpan: 1, rowSpan: 2 }, ], [] ); console.log(table.toString());
┌────────────────────────┐ │ 0-0 (1x3) │ ├────────────┬───────────┤ │ 1-0 (2x2) │ 1-2 (2x1) │ │ │ │ │ │ │ └────────────┴───────────┘
┌───────────────┐ │ 0-0 (1x3) │ ├───┬───────────┤ │ … │ 1-2 (2x1) │ │ │ │ │ │ │ └───┴───────────┘
The text was updated successfully, but these errors were encountered:
Fix to erroneous column truncation when using colSpan (#289) (#290)
40e86bc
Successfully merging a pull request may close this issue.
If an entire column contains cells with a colWidth > 1, they don't get a proper width calculation (when colWidths aren't specified).
This can occur in different circumstances.
Expected:
Current behavior:
If a cell above has colSpan, no width is passed down, and a cell below might be truncated when it doesn't need to be. Eg.
Expected:
Current behavior:
The text was updated successfully, but these errors were encountered: