From e864740df744aad46c02a89d600e06cbc962ea75 Mon Sep 17 00:00:00 2001
From: Pelayo Arbués <gonzalezpelayo@gmail.com>
Date: Tue, 06 Aug 2024 01:44:34 +0000
Subject: [PATCH] docs: Adds back Pelayo Arbues blog to showcase (#1314)
---
quartz/plugins/transformers/ofm.ts | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts
index 8fbfd37..5ec7c5a 100644
--- a/quartz/plugins/transformers/ofm.ts
+++ b/quartz/plugins/transformers/ofm.ts
@@ -2,7 +2,6 @@
import { Root, Html, BlockContent, DefinitionContent, Paragraph, Code } from "mdast"
import { Element, Literal, Root as HtmlRoot } from "hast"
import { ReplaceFunction, findAndReplace as mdastFindReplace } from "mdast-util-find-and-replace"
-import { slug as slugAnchor } from "github-slugger"
import rehypeRaw from "rehype-raw"
import { SKIP, visit } from "unist-util-visit"
import path from "path"
@@ -196,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