Skip to content

href breaks when content is truncated #338

Closed

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

Activity

  1. speedytwenty commented on Apr 23, 2024

    @speedytwenty
    Collaborator

    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

  2. added a commit that references this issue on May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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