diff --git a/formatMessages.mjs b/formatMessages.mjs index 6ed78e9..97de909 100644 --- a/formatMessages.mjs +++ b/formatMessages.mjs @@ -165,7 +165,7 @@ function convertRoles(messages, roleFeatures) { // 转义正则特殊字符 function escapeRegExp(string) { - return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + return string.replace(/[\b.*+?^${}()|[\]\\]/g, '\\$&'); } // 替换 content 角色定义