From 114eb0b7294e8cbaa3e27b5332f911d6792772b8 Mon Sep 17 00:00:00 2001 From: Alex Tavarez Date: Sun, 23 Nov 2025 10:25:14 -0500 Subject: [PATCH] Altered selectors, ids and class names to fit plugin I currently use in Obsidian --- quartz/plugins/transformers/ofm.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index 7a523aa..b56ba0f 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -524,11 +524,11 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> plugins.push(() => { return (tree: Root, file) => { visit(tree, "code", (node: Code) => { - if (node.lang === "mermaid") { + if (node.lang === "mehrmaid") { file.data.hasMermaidDiagram = true node.data = { hProperties: { - className: ["mermaid"], + className: ["mehrmaid"], "data-clipboard": JSON.stringify(node.value), }, } @@ -680,7 +680,7 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> visit(tree, "element", (node: Element, _idx, parent) => { if ( node.tagName === "code" && - ((node.properties?.className ?? []) as string[])?.includes("mermaid") + ((node.properties?.className ?? []) as string[])?.includes("mehrmaid") ) { parent!.children = [ { @@ -719,17 +719,17 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> { type: "element", tagName: "div", - properties: { id: "mermaid-container", role: "dialog" }, + properties: { id: "mehrmaid-container", role: "dialog" }, children: [ { type: "element", tagName: "div", - properties: { id: "mermaid-space" }, + properties: { id: "mehrmaid-space" }, children: [ { type: "element", tagName: "div", - properties: { className: ["mermaid-content"] }, + properties: { className: ["mehrmaid-content"] }, children: [], }, ],