From a0d651d64dfd766157324fd86791da2168028cf2 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sun, 06 Aug 2023 00:53:29 +0000
Subject: [PATCH] reverse query param hack to re-add sourcemap support

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

diff --git a/quartz/plugins/transformers/links.ts b/quartz/plugins/transformers/links.ts
index f5bfdfc..0765062 100644
--- a/quartz/plugins/transformers/links.ts
+++ b/quartz/plugins/transformers/links.ts
@@ -76,7 +76,7 @@
                 // don't process external links or intra-document anchors
                 if (!(isAbsoluteUrl(dest) || dest.startsWith("#"))) {
                   dest = node.properties.href = transformLink(dest)
-                  const canonicalDest = path.normalize(joinSegments(curSlug, dest))
+                  const canonicalDest = path.posix.normalize(joinSegments(curSlug, dest))
                   const [destCanonical, _destAnchor] = splitAnchor(canonicalDest)
                   outgoing.add(destCanonical as CanonicalSlug)
                 }
@@ -100,7 +100,7 @@
                 if (!isAbsoluteUrl(node.properties.src)) {
                   const ext = path.extname(node.properties.src)
                   node.properties.src =
-                    transformLink(path.join("assets", node.properties.src)) + ext
+                    transformLink(joinSegments("assets", node.properties.src)) + ext
                 }
               }
             })

--
Gitblit v1.10.0