mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)
This commit is contained in:
@@ -59,6 +59,7 @@ export class ExtensionLinter {
|
||||
private readmeQ = new Set<TextDocument>();
|
||||
private timer: NodeJS.Timer | undefined;
|
||||
private markdownIt: MarkdownItType.MarkdownIt | undefined;
|
||||
private parse5: typeof import('parse5') | undefined;
|
||||
|
||||
constructor() {
|
||||
this.disposables.push(
|
||||
@@ -202,8 +203,10 @@ export class ExtensionLinter {
|
||||
let svgStart: Diagnostic;
|
||||
for (const tnp of tokensAndPositions) {
|
||||
if (tnp.token.type === 'text' && tnp.token.content) {
|
||||
const parse5 = await import('parse5');
|
||||
const parser = new parse5.SAXParser({ locationInfo: true });
|
||||
if (!this.parse5) {
|
||||
this.parse5 = await import('parse5');
|
||||
}
|
||||
const parser = new this.parse5.SAXParser({ locationInfo: true });
|
||||
parser.on('startTag', (name, attrs, _selfClosing, location) => {
|
||||
if (name === 'img') {
|
||||
const src = attrs.find(a => a.name === 'src');
|
||||
|
||||
Reference in New Issue
Block a user