From 91059843ae9122bd547ddfdfa5a30edd99a42ff7 Mon Sep 17 00:00:00 2001
From: reagenzn <aiooksa929@gmail.com>
Date: Fri, 01 Aug 2025 15:57:32 +0000
Subject: [PATCH] fix(search): prevent Enter key handling during IME composition (#2070)

---
 quartz/build.ts |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/quartz/build.ts b/quartz/build.ts
index 9e657b6..d9f5efc 100644
--- a/quartz/build.ts
+++ b/quartz/build.ts
@@ -125,9 +125,10 @@
     ctx,
     mut,
     contentMap,
-    ignored: (path) => {
-      if (gitIgnoredMatcher(path)) return true
-      const pathStr = path.toString()
+    ignored: (fp) => {
+      const pathStr = toPosixPath(fp.toString())
+      if (pathStr.startsWith(".git/")) return true
+      if (gitIgnoredMatcher(pathStr)) return true
       for (const pattern of cfg.configuration.ignorePatterns) {
         if (minimatch(pathStr, pattern)) {
           return true
@@ -250,9 +251,12 @@
   // update allFiles and then allSlugs with the consistent view of content map
   ctx.allFiles = Array.from(contentMap.keys())
   ctx.allSlugs = ctx.allFiles.map((fp) => slugifyFilePath(fp as FilePath))
-  const processedFiles = Array.from(contentMap.values())
-    .filter((file) => file.type === "markdown")
-    .map((file) => file.content)
+  let processedFiles = filterContent(
+    ctx,
+    Array.from(contentMap.values())
+      .filter((file) => file.type === "markdown")
+      .map((file) => file.content),
+  )
 
   let emittedFiles = 0
   for (const emitter of cfg.plugins.emitters) {

--
Gitblit v1.10.0