Skip to content

Issues with ANSI escape sequences #5

@andywer

Description

@andywer

Hi and thanks for the handy package! I just encountered an issue, though.

If the input contains ANSI escape sequences, the aligning won't work reliably. I encountered the issue when using center-align together with chalk.

Proposal: strip-ansi could be applied on the input line before determining its length in order to not include non-visible characters in the length.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions