Skip to content

Commit 27dc46d

Browse files
committed
a
1 parent 2924b16 commit 27dc46d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/codewhisperer/util/supplementalContext/supplementalContextUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export function truncateLineByLine(input: string, l: number): string {
119119
return ''
120120
}
121121

122-
const shouldAddNewLineBack = input[input.length - 1] === os.EOL
122+
const shouldAddNewLineBack = input.endsWith(os.EOL)
123123
let lines = input.trim().split(os.EOL)
124124
let curLen = input.length
125125
while (curLen > maxLength) {

0 commit comments

Comments
 (0)