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 {
30
30
origionalCodeHighlightRange : Range [ ]
31
31
} > {
32
32
const textDoc = await vscode . workspace . openTextDocument ( filePath )
33
- const originalCode = textDoc . getText ( )
33
+ const originalCode = textDoc . getText ( ) . replaceAll ( '\r\n' , '\n' )
34
34
if ( originalCode === '' ) {
35
35
logger . error ( `udiff format error` )
36
36
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'
25
25
*/
26
26
export async function getPatchedCode ( filePath : string , patch : string , snippetMode = false ) {
27
27
const document = await vscode . workspace . openTextDocument ( filePath )
28
- const fileContent = document . getText ( )
28
+ const fileContent = document . getText ( ) . replaceAll ( '\r\n' , '\n' )
29
29
// Usage with the existing getPatchedCode function:
30
30
31
31
let updatedPatch = patch
You can’t perform that action at this time.
0 commit comments