-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Uri.parse doesnt render link correctly if the uri has a space in it #113328
Comments
Please provide a simple repo case. I have tried with the provider below and everything is working fine
|
u can try with the extension provided above, its basically a
i've even tried with an old version of the extension and still give the same result, whats really strange is the other 2 normal links "open file, open url" works without any problems. also plz note that am using the second example of the docs where we pass arguments to the cmnd, maybe thats the problem am not sure. |
Sorry, but asking you to distill a repo case from that |
sure np, i will ping you once done. |
https://github.com/ctf0/cnbd-uri-test, same ext downsized to bare min
|
finally found the issue. if the uri have an empty space in it, it wont render correctly and will show the text instead.
removing the empty spaces will render the link as expected. |
@ctf0 This is confusing. How does #113328 (comment) relate to the document link provider API? That comment talks about markdown link syntax which seems unrelated to that API |
@jrieken actually u can use the same logic with any api that use so to thumbs up, i believe the issue is more related to |
a temp solution for anyone having this issue is to use |
This get more confusing. The make zero sense to me,
|
let args = encodeURIComponent(JSON.stringify([{cmnd: 'hello world'}]))
new vscode.DocumentLink(new vscode.Range(0, 0, 1, 0), vscode.Uri.parse(`command:extension.helloWorld?${args}`))
|
Steps to Reproduce:
based on the docs
i have an ext that have the same setup but with a DoucmentLink instead of hover, which was working perfectly but now instead of getting a link i get the text
[remove "spatie/laravel-backup"](command:gotoPackage.removePackage?[{"cmnd":"composer remove spatie/laravel-backup","pkg":"spatie/laravel-backup"}] "Execute command gotoPackage.removePackage") (cmd + click)
and here is the console log
am not sure if the api has changed or is it a genuine bug 😢
Does this issue occur when all extensions are disabled?: No
The text was updated successfully, but these errors were encountered: