diff --git a/index.js b/index.js index b059410..2e3afd2 100644 --- a/index.js +++ b/index.js @@ -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; } }; diff --git a/package.json b/package.json index 8256007..8af3af5 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test.js.md b/test.js.md index f6d7dd9..ba05204 100644 --- a/test.js.md +++ b/test.js.md @@ -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 Website]8;;' + 'My Website' -## render fallback +## render > Snapshot 1 - 'My Website (https://sindresorhus.com)' + ']8;;https://sindresorhus.comMy Website]8;;' -## exclude fallback if disabled +## render fallback > Snapshot 1 - 'My Website' + 'My Website (​https://sindresorhus.com​)' diff --git a/test.js.snap b/test.js.snap index 791d8e8..9aaf685 100644 Binary files a/test.js.snap and b/test.js.snap differ