diff --git a/src/widget.ts b/src/widget.ts index 390a005..e1ffbd3 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -104,7 +104,7 @@ export class HtmlViewer extends Widget { if (!cm) { return; } - let url = this.node.baseURI.replace("/lab", "/files/") + this.context.path; + let url = this.node.baseURI.replace(/\/lab.*/, "/files/") + this.context.path; this._html.setAttribute('src', url); }