Fix regular expression for rewriting iframe webview html replacing quotes

This commit is contained in:
Matt Bierner 2019-06-24 17:22:03 -07:00
parent 8c8f79dcef
commit a77402669c

View file

@ -172,7 +172,7 @@ export class IFrameWebview extends Disposable implements Webview {
}
private preprocessHtml(value: string): string {
return value.replace(/(?:["'])vscode-resource:([^\s'"]+)(?:["'])/gi, '/vscode-resource$1');
return value.replace(/(?<=["'])vscode-resource:([^\s'"]+)(?=["'])/gi, '/vscode-resource$1');
}
public update(html: string, options: WebviewContentOptions, retainContextWhenHidden: boolean) {