From a1a08317734d04d7b21451e31fec35c53ad2d72e Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Wed, 2 Apr 2025 21:41:56 +0000 Subject: [PATCH] Remove linker element --- quartz/plugins/transformers/ofm.ts | 147 +---------------------------- 1 file changed, 3 insertions(+), 144 deletions(-) diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index da0b36b67..5a75a3518 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -553,55 +553,8 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> node.properties = { ...node.properties, id: block, + href: anchor, } - node.children = [ - ...node.children, - { - type: "element", - tagName: "a", - properties: { - role: "anchor", - ariaHidden: true, - tabIndex: -1, - "data-no-popover": true, - href: anchor, - }, - children: [ - { - type: "element", - tagName: "svg", - properties: { - width: 18, - height: 18, - viewBox: "0 0 24 24", - fill: "none", - stroke: "currentColor", - "stroke-width": "2", - "stroke-linecap": "round", - "stroke-linejoin": "round", - }, - children: [ - { - type: "element", - tagName: "path", - properties: { - d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", - }, - children: [], - }, - { - type: "element", - tagName: "path", - properties: { - d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", - }, - children: [], - }, - ], - }, - ], - }, - ] file.data.blocks![block] = node } } @@ -632,55 +585,8 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> element.properties = { ...element.properties, id: block, + href: anchor, } - element.children = [ - ...element.children, - { - type: "element", - tagName: "a", - properties: { - role: "anchor", - ariaHidden: true, - tabIndex: -1, - "data-no-popover": true, - href: anchor, - }, - children: [ - { - type: "element", - tagName: "svg", - properties: { - width: 18, - height: 18, - viewBox: "0 0 24 24", - fill: "none", - stroke: "currentColor", - "stroke-width": "2", - "stroke-linecap": "round", - "stroke-linejoin": "round", - }, - children: [ - { - type: "element", - tagName: "path", - properties: { - d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", - }, - children: [], - }, - { - type: "element", - tagName: "path", - properties: { - d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", - }, - children: [], - }, - ], - }, - ], - }, - ] file.data.blocks![block] = element } return @@ -692,55 +598,8 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> node.properties = { ...node.properties, id: block, + href: anchor, } - node.children = [ - ...node.children, - { - type: "element", - tagName: "a", - properties: { - role: "anchor", - ariaHidden: true, - tabIndex: -1, - "data-no-popover": true, - href: anchor, - }, - children: [ - { - type: "element", - tagName: "svg", - properties: { - width: 18, - height: 18, - viewBox: "0 0 24 24", - fill: "none", - stroke: "currentColor", - "stroke-width": "2", - "stroke-linecap": "round", - "stroke-linejoin": "round", - }, - children: [ - { - type: "element", - tagName: "path", - properties: { - d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", - }, - children: [], - }, - { - type: "element", - tagName: "path", - properties: { - d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", - }, - children: [], - }, - ], - }, - ], - }, - ] file.data.blocks![block] = node } }