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

Does not work on terminal-link #28

Closed
LitoMore opened this issue Feb 20, 2019 · 2 comments
Closed

Does not work on terminal-link #28

LitoMore opened this issue Feb 20, 2019 · 2 comments

Comments

@LitoMore
Copy link
Contributor

This bug only appears on iTerm 2.

How to reproduce

const terminalLink = require('terminal-link');
const stripAnsi = require('strip-ansi');

const link = terminalLink('click', 'https://github.com', {fallback: text => text});

console.log(stripAnsi(link));

Expected ouput

click

Actual output

ttps://github.com/sindresorhusclick
@sindresorhus sindresorhus transferred this issue from chalk/strip-ansi Feb 20, 2019
@LitoMore
Copy link
Contributor Author

LitoMore commented Feb 20, 2019

@sindresorhus Should we add the terminal link pattern to the patterns array if the terminal does not support terminal link?

@sindresorhus
Copy link
Member

sindresorhus commented Feb 20, 2019

Yes, it should strip it no matter what. The string to strip might come from somewhere else where the terminal did support a terminal link.

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