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/plugins/emitters/cname.ts | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/quartz/plugins/emitters/cname.ts b/quartz/plugins/emitters/cname.ts
index cbed2a8..0209d9a 100644
--- a/quartz/plugins/emitters/cname.ts
+++ b/quartz/plugins/emitters/cname.ts
@@ -1,8 +1,7 @@
import { FilePath, joinSegments } from "../../util/path"
import { QuartzEmitterPlugin } from "../types"
import fs from "fs"
-import chalk from "chalk"
-import DepGraph from "../../depgraph"
+import { styleText } from "util"
export function extractDomainFromBaseUrl(baseUrl: string) {
const url = new URL(`https://${baseUrl}`)
@@ -11,15 +10,11 @@
export const CNAME: QuartzEmitterPlugin = () => ({
name: "CNAME",
- getQuartzComponents() {
- return []
- },
- async getDependencyGraph(_ctx, _content, _resources) {
- return new DepGraph<FilePath>()
- },
- async emit({ argv, cfg }, _content, _resources): Promise<FilePath[]> {
+ async emit({ argv, cfg }) {
if (!cfg.configuration.baseUrl) {
- console.warn(chalk.yellow("CNAME emitter requires `baseUrl` to be set in your configuration"))
+ console.warn(
+ styleText("yellow", "CNAME emitter requires `baseUrl` to be set in your configuration"),
+ )
return []
}
const path = joinSegments(argv.output, "CNAME")
@@ -27,7 +22,8 @@
if (!content) {
return []
}
- fs.writeFileSync(path, content)
+ await fs.promises.writeFile(path, content)
return [path] as FilePath[]
},
+ async *partialEmit() {},
})
--
Gitblit v1.10.0