Change:
if (href === text) { // raw link case text = removeMarkdownEscapes(text); } <del> href = _href(href, false); if (markdown.baseUri) { href = resolveWithBaseUri(URI.from(markdown.baseUri), href); } </del> title = typeof title === 'string' ? removeMarkdownEscapes(title) : ''; href = removeMarkdownEscapes(href); <del> if ( !href || /^data:|javascript:/i.test(href) || (/^command:/i.test(href) && !markdown.isTrusted) || /^command:(///)?_workbench.downloadResource/i.test(href) ) { // drop the link return text; } else { // HTML Encode href href = href.replace(/&/g, '&amp;') .replace(/</g, '&lt;') .replace(/>/g, '&gt;') .replace(/"/g, '&quot;') .replace(/'/g, '&#39;'); return `<a href="" data-href="${href}" title="${title || href}">${text}</a>`; } </del> <ins> // HTML Encode href href = href.replace(/&/g, '&amp;') .replace(/</g, '&lt;') .replace(/>/g, '&gt;') .replace(/"/g, '&quot;') .replace(/'/g, '&#39;'); return `<a href="${href}" title="${title || href}">${text}</a>`; </ins> }; renderer.paragraph = (text): string => { return `<p>${text}</p>`;

Discussion:
Issue Type: <bBug</bHello, Regarding the , in Markdown this: Renders a link. In a VS Code Extension, this is also possible: Creating a link to run a command. One would think creating an actual anchor link like this: Would work but the click does not execute the command. VS Code version: Code 1.63.0 (, 2021-12-07T05:18:59.299Z) OS version: Linux arm64 5.15.7-1-MANJARO-ARM Restricted Mode: No <details<summarySystem Info</summary </details<details<summaryExtensions (4)</summaryExtensionVersion ------ vscode-eslint2.2.2 gitlens11.7.0 vscode-drawio1.6.4 vsliveshare1.0.5242 </details<!-- generated by issue reporter --
can i take this?
I think they'd be happy if you created a PR. For completeness: works: but the cursor does not change to a hand icon like if was populated.
Thanks, will take a look
This is what I found. In markdown links are detected at two places: detects anything starting with http:// or https:// or file:// checks for and returns anything inside () as URI That's why is detected as a link but isn't. I couldn't get to work. I tried holding ctrl while clicking it and tried in preview as well. Can you tell me how to reproduce it?
You'll need to for it to take an action. The example in the link is probably the easiest. After registration create a MarkdownString containing the registered command. In regards to the linked example: You should be able to click on it and see the console log. Note that the cursor doesn't change to a hand icon.
Have you found any solution? For me even doesn't work. :( I've used a registered and available command.
The way I implemented Markdown and executing a registered command (through ) was by adding a . The structure is very particular because it is an implementation of the and is something like this: Make sure you are using the correct VS Code version too.
Command links in should now also work for normal elements included in the markdown (you have to set and on the to enable this)
where should links work? I tried this in a completion item and neither link syntaxes work: !
Sorry for not adding verification details. The markdown string needs to both trusted and have html enabled: