From c2022cac576b511b58bb80e468ae84fe9a7bd00a Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Wed, 23 Oct 2019 18:49:52 -0700 Subject: [PATCH] Fix for relative links not being resolved in notebook outputs (#7966) * Fix for relative links not being resolved * Add comment --- .../parts/notebook/browser/outputs/notebookMarkdown.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sql/workbench/parts/notebook/browser/outputs/notebookMarkdown.ts b/src/sql/workbench/parts/notebook/browser/outputs/notebookMarkdown.ts index 77fb3be910..14d65a1647 100644 --- a/src/sql/workbench/parts/notebook/browser/outputs/notebookMarkdown.ts +++ b/src/sql/workbench/parts/notebook/browser/outputs/notebookMarkdown.ts @@ -190,7 +190,9 @@ export class NotebookMarkdownRenderer { } } try { - if (URI.parse(href)) { + // The call to resolveUrl() (where relative hrefs are converted to absolute ones) comes after this point + // Therefore, we only want to return immediately if the path is absolute here + if (URI.parse(href) && path.isAbsolute(href)) { return href; } } catch {