Form an MD link from highlighted text and URL

What I would like to have is an extension where highlighted text is transformed into an MD link. For example: if I copy a selected text GHE12345, I would like that to be GHE12345

I tried to use this Copy from address bar as Markdown URL with title but for some reason that extension does not work. Any ideas?

This should do it:

// #popclip
// name: GH Issue
// language: javascript
const text = popclip.input.text;
const url = `https://github.com/repo/issue/${encodeURIComponent(text)}`;
const md = `[${text}](${url})`;
popclip.copyText(md);

(The above block is an extension snippet — select it then click “Install Extension” in PopClip.)