diff --git a/quartz/components/scripts/popover.inline.ts b/quartz/components/scripts/popover.inline.ts index 52563e003..d99dc25ef 100644 --- a/quartz/components/scripts/popover.inline.ts +++ b/quartz/components/scripts/popover.inline.ts @@ -88,9 +88,7 @@ async function mouseEnterHandler( el.id = targetID }) console.log(hash) - const targetLink = hash.startsWith("#popover") - ? hash - : `#popover-${hash.slice(1)}` + const targetLink = hash.startsWith("#popover") ? hash : `#popover-${hash.slice(1)}` hash = targetLink const elts = [...html.getElementsByClassName("popover-hint")] if (elts.length === 0) return diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index 5a75a3518..5c2f4b25c 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -545,15 +545,11 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> if (matches && matches.length >= 1) { parent!.children.splice(index! + 2, 1) const block = matches[0].slice(1) - const anchor = block.startsWith("/") - ? `#block-${block.slice(1)}` - : `#block-${block}` if (!Object.keys(file.data.blocks!).includes(block)) { node.properties = { ...node.properties, id: block, - href: anchor, } file.data.blocks![block] = node } @@ -567,9 +563,6 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> if (matches && matches.length >= 1) { last.value = last.value.slice(0, -matches[0].length) const block = matches[0].slice(1) - const anchor = block.startsWith("/") - ? `#block-${block.slice(1)}` - : `#block-${block}` if (last.value === "") { // this is an inline block ref but the actual block @@ -585,7 +578,6 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> element.properties = { ...element.properties, id: block, - href: anchor, } file.data.blocks![block] = element } @@ -598,7 +590,6 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin> node.properties = { ...node.properties, id: block, - href: anchor, } file.data.blocks![block] = node }