Altered selectors, ids and class names to fit plugin I currently use in Obsidian
This commit is contained in:
@@ -524,11 +524,11 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>>
|
||||
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<Partial<Options>>
|
||||
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<Partial<Options>>
|
||||
{
|
||||
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: [],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user