Skip to content

Commit 915b0f8

Browse files
committed
Refactor XML structure in build_changes_xml to simplify file diff and archive content formatting
1 parent 4cbf587 commit 915b0f8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/vscode/src/views/panel/backend/utils/replace-git-symbols.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ const build_changes_xml = (
6767
})
6868
}
6969
}
70+
changes_content += `<![CDATA[\n${full_file_diff}\n]]>\n`
7071
if (file_content) {
71-
changes_content += `<archive>\n<![CDATA[\n${file_content}\n]]>\n</archive>\n`
72+
changes_content += `<![CDATA[\n${file_content}\n]]>\n`
7273
}
73-
changes_content += `<changes>\n<![CDATA[\n${full_file_diff}\n]]>\n</changes>\n`
7474
changes_content += `</file>\n`
7575
}
7676
}
7777

78-
return changes_content
78+
return changes_content ? `<changes>\n${changes_content}</changes>\n` : ''
7979
}
8080

8181
export const replace_changes_symbol = async (params: {

0 commit comments

Comments
 (0)