Update formatMessages.mjs

This commit is contained in:
被遗忘的记忆
2024-11-20 00:42:45 +08:00
committed by GitHub
parent 354bdd03f4
commit 4b79fcd63c
+1 -1
View File
@@ -165,7 +165,7 @@ function convertRoles(messages, roleFeatures) {
// 转义正则特殊字符
function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
return string.replace(/[\b.*+?^${}()|[\]\\]/g, '\\$&');
}
// 替换 content 角色定义