File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
amazonq/src/app/inline/EditRendering
core/src/shared/utilities Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export class SvgGenerationService {
3030 origionalCodeHighlightRange : Range [ ]
3131 } > {
3232 const textDoc = await vscode . workspace . openTextDocument ( filePath )
33- const originalCode = textDoc . getText ( )
33+ const originalCode = textDoc . getText ( ) . replaceAll ( '\r\n' , '\n' )
3434 if ( originalCode === '' ) {
3535 logger . error ( `udiff format error` )
3636 throw new ToolkitError ( 'udiff format error' )
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import jaroWinkler from 'jaro-winkler'
2525 */
2626export async function getPatchedCode ( filePath : string , patch : string , snippetMode = false ) {
2727 const document = await vscode . workspace . openTextDocument ( filePath )
28- const fileContent = document . getText ( )
28+ const fileContent = document . getText ( ) . replaceAll ( '\r\n' , '\n' )
2929 // Usage with the existing getPatchedCode function:
3030
3131 let updatedPatch = patch
You can’t perform that action at this time.
0 commit comments