From 8fb97a80025b2f8972fdead402fc446774b77cde Mon Sep 17 00:00:00 2001 From: yzhai Date: Mon, 16 Mar 2026 18:24:11 +0800 Subject: [PATCH] style: apply prettier formatting to obsidian-highlight plugin files --- quartz/plugins/transformers/obsidian-highlight.md | 4 ++-- quartz/plugins/transformers/obsidian-highlight.ts | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/quartz/plugins/transformers/obsidian-highlight.md b/quartz/plugins/transformers/obsidian-highlight.md index fb94c076a..95deea31c 100644 --- a/quartz/plugins/transformers/obsidian-highlight.md +++ b/quartz/plugins/transformers/obsidian-highlight.md @@ -20,8 +20,8 @@ Plugin.ObsidianHighlight() ## Options -| Option | Type | Default | Description | -|--------|------|---------|-------------| +| Option | Type | Default | Description | +| ---------------- | -------- | ------------------ | ------------------------------------ | | `highlightClass` | `string` | `"text-highlight"` | CSS class for the highlight `` | ## Example diff --git a/quartz/plugins/transformers/obsidian-highlight.ts b/quartz/plugins/transformers/obsidian-highlight.ts index b133a0f1a..5aeecc5fe 100644 --- a/quartz/plugins/transformers/obsidian-highlight.ts +++ b/quartz/plugins/transformers/obsidian-highlight.ts @@ -68,7 +68,11 @@ export const ObsidianHighlight: QuartzTransformerPlugin> = (use // Case 2: == at start/end with elements between (e.g. ==***text***==) // First, split any "==" suffix/prefix from text nodes into separate nodes // so that all "==" markers are standalone text nodes - if (child.type === "text" && (child as Text).value.endsWith("==") && (child as Text).value.trim() !== "==") { + if ( + child.type === "text" && + (child as Text).value.endsWith("==") && + (child as Text).value.trim() !== "==" + ) { const val = (child as Text).value const prefix = val.slice(0, -2) const parts: RootContent[] = [] @@ -80,7 +84,11 @@ export const ObsidianHighlight: QuartzTransformerPlugin> = (use } // Split "==text" prefix (e.g. "==text" at end of content before emphasis) // This handles the case where text before emphasis starts with "==" - if (child.type === "text" && (child as Text).value.startsWith("==") && (child as Text).value.trim() !== "==") { + if ( + child.type === "text" && + (child as Text).value.startsWith("==") && + (child as Text).value.trim() !== "==" + ) { const val = (child as Text).value const suffix = val.slice(2) const parts: RootContent[] = []