fix: 修复某些情况下无法输出日志的bug

pull/373/head
xiaojunnuo 2025-04-13 01:17:52 +08:00
parent 203f2984d7
commit 70101bfa7a
1 changed files with 1 additions and 2 deletions

View File

@ -42,8 +42,7 @@ export function buildLogger(write: (text: string) => void) {
continue;
}
//换成同长度的*号, item可能有多行
const reg = new RegExp(item, "g");
text = text.replaceAll(reg, "*".repeat(item.length));
text = text.replaceAll(item, "*".repeat(item.length));
}
write(text);
},