`href` breaks when `content` is truncated
ItsNickBarry opened this issue · comments
Nick Barry commented
Truncated hrefs turn everything that follows into a link. In this reproduction example, the third table row is included because it prevents the href from the first row from ruining the entire terminal window.
const Table = require('cli-table3');
const table = new Table({
colWidths: [10],
style: { border: [], head: [] },
});
const href = 'http://example.com';
table.push([{ content: 'looooooooooooong', href }]);
table.push([{ content: 'not href' }]);
table.push([{ content: 'short', href }]);
console.log(table.toString());
Chris commented
Thanks for the report. I don't foresee being able to address this anytime soon, however. A PR with a failing test would help expedite the effort.
Examples of issue based tests can be found here: https://github.com/cli-table/cli-table3/tree/master/test/issues