Skip to content

href breaks when content is truncated #338

@ItsNickBarry

Description

@ItsNickBarry

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());

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions