microsoft / codetour

VS Code extension that allows you to record and play back guided tours of codebases, directly within the editor.
https://aka.ms/codetour
MIT License
4.36k stars 113 forks source link

Can't open URL #189

Closed synedra closed 3 years ago

synedra commented 3 years ago

In a step, this is simply a no-op:

[Visit your site](command:vscode.open?["http://localhost:3000"])

lostintangent commented 3 years ago

Could you share what markdown content you're using for the link? Something like this should work: [Visit your site](https://github.com)

lostintangent commented 3 years ago

You should be able to use a standard Markdown link for HTTP-based URLs, since CodeTour will translate that into the appropriate open behavior. If you use [Visit your site](http://localhost:3000), does that work? I just tried it and was able to get it working. So let me know if you're hitting any issues.

lostintangent commented 3 years ago

Closing this as resolved per my previous comment. Let me know if you're hitting an issue here. Thanks!

jeluard commented 2 years ago

@lostintangent I can reproduce the issue with the following markdown (used in the doc): [Open URL](command:vscode.open?["https://aka.ms/codetour"]). Not that this uses a command, vscode.open and doesn't just try to open a URL.

The following exception is thrown:

 ERR [UriError]: Scheme contains illegal characters.: Error: [UriError]: Scheme contains illegal characters.
    at v (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:70:77507)
    at new S (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:70:78440)
    at new b (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:70:80088)
    at Function.revive (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:70:79926)
    at vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2390:53776
    at f.invokeFunction (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:600:319)
    at f._tryExecuteCommand (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1479:3496)
    at vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1479:3245
jeluard commented 2 years ago

Note that the following works: [Open URL](command:simpleBrowser.show?["https://aka.ms/codetour"])