From 0c199975f2d469ecdfd7efcf2ddd16ffa1dc492b Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 17 Aug 2023 07:55:28 +0000
Subject: [PATCH] various path fixes for links to extensions, fix relative paths in links

---
 quartz/plugins/transformers/links.ts |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/quartz/plugins/transformers/links.ts b/quartz/plugins/transformers/links.ts
index 10b527c..d867039 100644
--- a/quartz/plugins/transformers/links.ts
+++ b/quartz/plugins/transformers/links.ts
@@ -8,7 +8,7 @@
   joinSegments,
   splitAnchor,
   transformLink,
-} from "../../path"
+} from "../../util/path"
 import path from "path"
 import { visit } from "unist-util-visit"
 import isAbsoluteUrl from "is-absolute-url"
@@ -79,9 +79,8 @@
               ) {
                 if (!isAbsoluteUrl(node.properties.src)) {
                   let dest = node.properties.src as RelativeURL
-                  const ext = path.extname(node.properties.src)
                   dest = node.properties.src = transformLink(curSlug, dest, transformOptions)
-                  node.properties.src = dest + ext
+                  node.properties.src = dest
                 }
               }
             })

--
Gitblit v1.10.0