From 9240dfb9c1ff9936d3269eb8bee3a0de55292403 Mon Sep 17 00:00:00 2001 From: hannesrudolph Date: Thu, 7 Aug 2025 07:39:48 -0700 Subject: [PATCH] fix: use CDATA sections in XML examples to prevent parser errors The root cause of issue #4852 was that the XML examples in the tool description contained unescaped markdown backticks which confused the fast-xml-parser. Using CDATA sections properly escapes this content. This is the actual fix - no fallback parser or workarounds needed. --- .../strategies/multi-file-search-replace.ts | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/core/diff/strategies/multi-file-search-replace.ts b/src/core/diff/strategies/multi-file-search-replace.ts index c71d3c3807d..a212cf2b8e7 100644 --- a/src/core/diff/strategies/multi-file-search-replace.ts +++ b/src/core/diff/strategies/multi-file-search-replace.ts @@ -139,8 +139,7 @@ Search/Replace content: eg.file.py - -\`\`\` + >>>>>> REPLACE -\`\`\` - +]]> @@ -165,8 +163,7 @@ Search/Replace content with multi edits across multiple files: eg.file.py - -\`\`\` + >>>>>> REPLACE -\`\`\` - +]]> - -\`\`\` + >>>>>> REPLACE -\`\`\` - +]]> eg.file2.py - -\`\`\` + >>>>>> REPLACE -\`\`\` - +]]>