From f37dbe1a591af204b09ab1664b9ff9da5b5ec46d Mon Sep 17 00:00:00 2001
From: Emile Bangma <ewjbangma@hotmail.com>
Date: Sun, 14 Jul 2024 10:06:52 +0000
Subject: [PATCH] fix(translusion): block reference not being recognized. (#1274)
---
quartz/plugins/transformers/ofm.ts | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts
index 5c0a2f2..5ec7c5a 100644
--- a/quartz/plugins/transformers/ofm.ts
+++ b/quartz/plugins/transformers/ofm.ts
@@ -195,7 +195,7 @@
const [rawFp, rawHeader, rawAlias]: (string | undefined)[] = capture
const [fp, anchor] = splitAnchor(`${rawFp ?? ""}${rawHeader ?? ""}`)
- const blockRef = Boolean(anchor?.startsWith("^")) ? "^" : ""
+ const blockRef = Boolean(rawHeader?.match(/^#?\^/)) ? "^" : ""
const displayAnchor = anchor ? `#${blockRef}${anchor.trim().replace(/^#+/, "")}` : ""
const displayAlias = rawAlias ?? rawHeader?.replace("#", "|") ?? ""
const embedDisplay = value.startsWith("!") ? "!" : ""
--
Gitblit v1.10.0