Skip to content

Commit 14927f2

Browse files
committed
fix: 调整报错文本格式
1 parent 38fdae9 commit 14927f2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/cvbManager.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -568,13 +568,8 @@ function applyExactReplace(strContent: string, op: ExactReplaceOperation): strin
568568
if (!regPattern.test(strContent))
569569
{
570570
const diagnosticMessage = diagnoseMatchFailure(strContent, op);
571-
const errorMsg = `## EXACT-REPLACE 失败\n` +
572-
`### FILE: ${op.m_strFilePath}\n` +
573-
`### BEFORE_ANCHOR:\n\`\`\`\n${op.m_strBeforeAnchor}\n\`\`\`\n` +
574-
`### AFTER_ANCHOR:\n\`\`\`\n${op.m_strAfterAnchor}\n\`\`\`\n` +
575-
`### OLD_CONTENT:\n\`\`\`\n${op.m_strOldContent}\n\`\`\`\n` +
576-
`### NEW_CONTENT:\n\`\`\`\n${op.m_strNewContent}\n\`\`\`\n` +
577-
`### 错误:\n${diagnosticMessage}`;
571+
const errorMsg = `EXACT-REPLACE 失败\n` +
572+
`错误:\n${diagnosticMessage}`;
578573

579574
console.log(errorMsg);
580575
throw new Error(errorMsg);

0 commit comments

Comments
 (0)