Skip to content

Commit 41b0a8b

Browse files
LitoMoresindresorhus
authored andcommittedMar 8, 2019
Add support for terminal link (#26)
1 parent 841f0c4 commit 41b0a8b

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"text"
4444
],
4545
"dependencies": {
46-
"ansi-regex": "^4.0.0"
46+
"ansi-regex": "^4.1.0"
4747
},
4848
"devDependencies": {
4949
"ava": "^0.25.0",

‎readme.md

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ const stripAnsi = require('strip-ansi');
3030

3131
stripAnsi('\u001B[4mUnicorn\u001B[0m');
3232
//=> 'Unicorn'
33+
34+
stripAnsi('\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007');
35+
//=> 'Click'
3336
```
3437

3538

‎test.js

+4
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ test('strip color from ls command', t => {
1212
test('strip reset;setfg;setbg;italics;strike;underline sequence from string', t => {
1313
t.is(stripAnsi('\u001B[0;33;49;3;9;4mbar\u001B[0m'), 'bar');
1414
});
15+
16+
test('strip link from terminal link', t => {
17+
t.is(stripAnsi('\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'), 'click');
18+
});

0 commit comments

Comments
 (0)
Please sign in to comment.