From b5295e0f261dd6dc7903bae2102115340ccd46dd Mon Sep 17 00:00:00 2001
From: Neel Shah <neelshah.1998@gmail.com>
Date: Sun, 11 Feb 2024 19:08:12 +0000
Subject: [PATCH] fix: breadcrumbs displayName issue for file names ending with index (#839)
---
quartz/plugins/transformers/ofm.ts | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts
index a9d3945..89b297b 100644
--- a/quartz/plugins/transformers/ofm.ts
+++ b/quartz/plugins/transformers/ofm.ts
@@ -450,13 +450,19 @@
// replace first line of blockquote with title and rest of the paragraph text
node.children.splice(0, 1, ...blockquoteContent)
+ const classNames = ["callout", calloutType]
+ if (collapse) {
+ classNames.push("is-collapsible")
+ }
+ if (defaultState === "collapsed") {
+ classNames.push("is-collapsed")
+ }
+
// add properties to base blockquote
node.data = {
hProperties: {
...(node.data?.hProperties ?? {}),
- className: `callout ${calloutType} ${collapse ? "is-collapsible" : ""} ${
- defaultState === "collapsed" ? "is-collapsed" : ""
- }`,
+ className: classNames.join(" "),
"data-callout": calloutType,
"data-callout-fold": collapse,
},
--
Gitblit v1.10.0