fix: rm terminalLink.isSupported checks #765
Open
+14
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
They're not needed - the terminal-link package checks this internally and formats the URL using parentheses and zero-width spaces. As it is the logic is dropping the URL in terminals like VSCode's/Cursor's terminal.
Can't rely on terminal-link as-is, though, because of sindresorhus/terminal-link#18
I set the fallback to be
${text} ( ${url} )
(i.e. using regular spaces instead of zero-width, because many UIs include the trailing zero-width space which breaks the URL clickability/copyability - see the long list of references on that issue, from redwood, shopify cli, warp etc. etc.)I'm not familiar with terminal-link and unilaterally changing zero-width space to regular space could be a significant UI change, so I figured it's safer to sacrifice aesthetics for functionality just in the case of
np
.