Skip to content

Commit

Permalink
Bump terminal-link
Browse files Browse the repository at this point in the history
  • Loading branch information
colinking committed Sep 21, 2019
1 parent 3c4fc7d commit 98c86ba
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import terminalLink from 'terminal-link';
const Link = props => {
const options = {
fallback: (text, url) => {
return props.fallback ? `${text} (${url})` : text;
return props.fallback ? `${text} (\u200B${url}\u200B)` : text;
}
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
],
"dependencies": {
"prop-types": "^15.7.2",
"terminal-link": "^1.2.0"
"terminal-link": "^2.0.0"
},
"devDependencies": {
"@babel/cli": "^7.2.3",
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ render(

[Supported terminals.](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)

For unsupported terminals, the link will be printed in parens after the text: `My website (https://sindresorhus.com)`.
For unsupported terminals, the link will be printed in parens after the text: `My website ( https://sindresorhus.com )`.

#### url

Expand All @@ -47,7 +47,7 @@ The URL to link to.

Type: `boolean`

For unsupported terminals, `fallback` determines whether the URL should be printed in parens after the text: `My website (https://sindresorhus.com)`. Defaults to `true`.
For unsupported terminals, `fallback` determines whether the URL should be printed in parens after the text: `My website ( https://sindresorhus.com )`. Defaults to `true`.

## Related

Expand Down
12 changes: 6 additions & 6 deletions test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ The actual snapshot is saved in `test.js.snap`.

Generated by [AVA](https://ava.li).

## render
## exclude fallback if disabled

> Snapshot 1
']8;;https://sindresorhus.comMy [32mWebsite[39m]8;;'
'My Website'

## render fallback
## render

> Snapshot 1
'My Website (https://sindresorhus.com)'
']8;;https://sindresorhus.comMy [32mWebsite[39m]8;;'

## exclude fallback if disabled
## render fallback

> Snapshot 1
'My Website'
'My Website (​https://sindresorhus.com​)'
Binary file modified test.js.snap
Binary file not shown.

0 comments on commit 98c86ba

Please sign in to comment.