From fa6c02d3213dfd4e6da8e78bd3a2e7004555fd01 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Wed, 24 Jan 2024 01:08:56 +0000
Subject: [PATCH] fix: make search result card block

---
 quartz/plugins/transformers/syntax.ts |   30 +++++++++++++-----------------
 1 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/quartz/plugins/transformers/syntax.ts b/quartz/plugins/transformers/syntax.ts
index 0f46519..e847729 100644
--- a/quartz/plugins/transformers/syntax.ts
+++ b/quartz/plugins/transformers/syntax.ts
@@ -4,21 +4,17 @@
 export const SyntaxHighlighting: QuartzTransformerPlugin = () => ({
   name: "SyntaxHighlighting",
   htmlPlugins() {
-    return [[rehypePrettyCode, {
-      theme: 'css-variables',
-      onVisitLine(node) {
-        if (node.children.length === 0) {
-          node.children = [{ type: 'text', value: ' ' }]
-        }
-      },
-      onVisitHighlightedLine(node) {
-        node.properties.className ??= []
-        node.properties.className.push('highlighted')
-      },
-      onVisitHighlightedWord(node) {
-        node.properties.className ??= []
-        node.properties.className.push('word')
-      },
-    } satisfies Partial<CodeOptions>]]
-  }
+    return [
+      [
+        rehypePrettyCode,
+        {
+          keepBackground: false,
+          theme: {
+            dark: "github-dark",
+            light: "github-light",
+          },
+        } satisfies Partial<CodeOptions>,
+      ],
+    ]
+  },
 })

--
Gitblit v1.10.0