File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -226,10 +226,10 @@ export class DiffViewProvider {
226226 const newContentEOL = this . newContent . includes ( "\r\n" ) ? "\r\n" : "\n"
227227
228228 // Normalize EOL characters without trimming content
229- const normalizedEditedContent = editedContent . replace ( / \r \n | \n / g, newContentEOL )
229+ const normalizedEditedContent = editedContent . replace ( / \r \n | \n / g, newContentEOL ) . trimEnd ( )
230230
231231 // Just in case the new content has a mix of varying EOL characters.
232- const normalizedNewContent = this . newContent . replace ( / \r \n | \n / g, newContentEOL )
232+ const normalizedNewContent = this . newContent . replace ( / \r \n | \n / g, newContentEOL ) . trimEnd ( )
233233
234234 if ( normalizedEditedContent !== normalizedNewContent ) {
235235 // User made changes before approving edit.
You can’t perform that action at this time.
0 commit comments