From c55d54f068a102d85dc16c5c0e63db413bc56145 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 12 Aug 2023 17:16:55 +0000
Subject: [PATCH] enable rich text in callout title
---
quartz/plugins/transformers/links.ts | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/quartz/plugins/transformers/links.ts b/quartz/plugins/transformers/links.ts
index 9a9195b..5b15725 100644
--- a/quartz/plugins/transformers/links.ts
+++ b/quartz/plugins/transformers/links.ts
@@ -86,7 +86,8 @@
if (
opts.prettyLinks &&
node.children.length === 1 &&
- node.children[0].type === "text"
+ node.children[0].type === "text" &&
+ !node.children[0].value.startsWith("#")
) {
node.children[0].value = path.basename(node.children[0].value)
}
@@ -99,9 +100,10 @@
typeof node.properties.src === "string"
) {
if (!isAbsoluteUrl(node.properties.src)) {
+ let dest = node.properties.src as RelativeURL
const ext = path.extname(node.properties.src)
- node.properties.src =
- transformLink(joinSegments("assets", node.properties.src)) + ext
+ dest = node.properties.src = transformLink(dest)
+ node.properties.src = dest + ext
}
}
})
--
Gitblit v1.10.0