From 50d4e5b91aceb0aa1b37bcf61cd60d3d7d096500 Mon Sep 17 00:00:00 2001 From: djangoliv Date: Thu, 20 Sep 2018 10:42:37 +0200 Subject: [PATCH] Take workspaces in account --- src/widget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }