Skip to content

Commit 9e2a2ae

Browse files
committed
fix(add-remove=comment): fixed line editing
1 parent f911a50 commit 9e2a2ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/commands/addRemoveComment/addRemoveComment.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ export class AddRemoveCommentCommand {
6868
const editedLines = lines
6969
.reduce((acc: string[], line: string, i: number) => {
7070
if (i >= start.line && i <= end.line) {
71-
acc.push(this.addRemoveCommentToLine(line))
71+
// INFO: temporary removal of carriage returns (added back if relevant in join below)
72+
acc.push(this.addRemoveCommentToLine(line.replace(lineEnding, '')))
7273
}
7374

7475
return acc

0 commit comments

Comments
 (0)