Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slice links created by terminal-link #31

Open
vadimdemedes opened this issue May 7, 2020 · 1 comment
Open

Slice links created by terminal-link #31

vadimdemedes opened this issue May 7, 2020 · 1 comment

Comments

@vadimdemedes
Copy link

Currently this module doesn't support slicing links created by https://github.com/sindresorhus/terminal-link, it results in invalid output. For example:

const sliceAnsi = require('slice-ansi');
const terminalLink = require('terminal-link');

const link = terminalLink('Google', 'https://google.com');
sliceAnsi(link, 0, 6);
// Actual => \u001b[8;;https://googlm\u0007Googl\u001b[0m
// Expected (same as input) => \u001b]8;;https://google.com\u0007Google\u001b]8;;\u0007
@sindresorhus
Copy link
Member

For anyone that wants to work on this, see chalk/wrap-ansi@0e49047 by @nicholaschiasson for implementation and test inspiration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants