Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// match[1] = visible text
// match[2] = relevant escape code
// match[3] = skippable escape code
const ANSI_SEQUENCE = /^(.*?)(?:(\x1b\[[^m]+m|\x1b\]8;;.*?(?:\x1b\\|\u0007))|(\x1b\[\?[0-9]+[a-zA-Z]))/;
const ANSI_SEQUENCE = /^([\s\S]*?)(?:(\x1b\[[^m]+m|\x1b\]8;;[\s\S]*?(?:\x1b\\|\u0007))|(\x1b\[\?[0-9]+[a-zA-Z]))/;

const segmenter = new Intl.Segmenter(`en`, {granularity: `grapheme`});

Expand Down