From 4bb4215d2b56587adc9aea5d210760e971291617 Mon Sep 17 00:00:00 2001 From: fukusuket <41001169+fukusuket@users.noreply.github.com> Date: Sun, 14 Jan 2024 19:51:21 +0900 Subject: [PATCH] fix: exclude URL patterns from markdown-it-include target --- extension.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension.js b/extension.js index e0e28a2..20fbf5e 100644 --- a/extension.js +++ b/extension.js @@ -282,7 +282,7 @@ function convertMarkdownToHtml(filename, type, text) { if (vscode.workspace.getConfiguration('markdown-pdf')['markdown-it-include']['enable']) { md.use(require("markdown-it-include"), { root: path.dirname(filename), - includeRe: /:\[.+\]\((.+\..+)\)/i + includeRe: /:\[.+\]\((?!https?:|ftp:)(.+\..+)\)/i }); } @@ -898,4 +898,4 @@ function init() { } catch (error) { showErrorMessage('init()', error); } -} +} \ No newline at end of file