Skip to content

ANSI code stripping should be optional #11

@joepie91

Description

@joepie91

Currently, ANSI escape codes are always stripped by this library. However, there are plenty of contexts where one might be interested in the 'real' character count of a string, but where ANSI escape codes do not have a special semantic meaning, and so stripping them would result in an incorrect character count.

IMO, the ANSI code stripping should either be opt-in, or possibly even considered out-of-scope for this module entirely - since one can also just call strip-ansi on the string before passing it in, or whichever stripping function is appropriate for their specific semantic context.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions