Skip to content

Instantly share code, notes, and snippets.

@aviatesk
Created June 22, 2020 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aviatesk/129b5f70cdc6f28cd20811aee4a768ec to your computer and use it in GitHub Desktop.
Save aviatesk/129b5f70cdc6f28cd20811aee4a768ec to your computer and use it in GitHub Desktop.
// maybe handled by other client
s = `
foo [linktext](vscode-command:language-julia.openFile?${JSON.stringify({ file: 'foo', line: 10 })} "footitle")
bar [linktext](vscode-command:language-julia.openFile "bartitle")
`
s.replace(/vscode-command\:(.+)(|\?[\w\:\"\{\}\,]+)/g, (s, cmd, args) => {
console.log(args)
return `command:${cmd}${args}`
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment