mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
@@ -225,7 +225,6 @@ export class MarkdownEngine {
|
||||
return normalizeLink(externalSchemeUri.toString(true));
|
||||
}
|
||||
|
||||
|
||||
// Assume it must be an relative or absolute file path
|
||||
// Use a fake scheme to avoid parse warnings
|
||||
let uri = vscode.Uri.parse(`vscode-resource:${link}`);
|
||||
@@ -262,7 +261,7 @@ export class MarkdownEngine {
|
||||
const validateLink = md.validateLink;
|
||||
md.validateLink = (link: string) => {
|
||||
// support file:// links
|
||||
return validateLink(link) || link.indexOf('file:') === 0;
|
||||
return validateLink(link) || link.startsWith('file:') || /^data:image\/.*?;/.test(link);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user