mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 11:10:48 +00:00
Use test instead of match
This commit is contained in:
parent
c5ddf8bc5a
commit
621a354706
1 changed files with 3 additions and 3 deletions
|
@ -138,9 +138,9 @@ export function renderMarkdown(markdown: IMarkdownString, options: MarkdownRende
|
|||
href = removeMarkdownEscapes(href);
|
||||
if (
|
||||
!href
|
||||
|| href.match(/^data:|javascript:/i)
|
||||
|| (href.match(/^command:/i) && !markdown.isTrusted)
|
||||
|| href.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)
|
||||
|| /^data:|javascript:/i.test(href)
|
||||
|| (/^command:/i.test(href) && !markdown.isTrusted)
|
||||
|| /^command:(\/\/\/)?_workbench\.downloadResource/i.test(href)
|
||||
) {
|
||||
// drop the link
|
||||
return text;
|
||||
|
|
Loading…
Reference in a new issue