From 207479b6ce846470956beddc3f285150a463d5fa Mon Sep 17 00:00:00 2001 From: DIYgod Date: Wed, 3 May 2023 13:42:57 +0100 Subject: [PATCH] fix: replace image http to https --- src/markdown/rehype-image.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/markdown/rehype-image.ts b/src/markdown/rehype-image.ts index b4e7797f..1b336097 100644 --- a/src/markdown/rehype-image.ts +++ b/src/markdown/rehype-image.ts @@ -35,7 +35,8 @@ export const rehypeImage: Plugin, Root> = ({ if (isExternLink(url)) { if (!url.startsWith("https:") && IS_PROD) { - throw new Error(`External image url must start with https`) + console.error(`External image url must start with https: ${url}`) + url.replace(/^http:/, "https:") } return }