Skip to content

Commit

Permalink
fix(add-remove=comment): fixed line editing
Browse files Browse the repository at this point in the history
  • Loading branch information
YuryShkoda committed May 19, 2023
1 parent f911a50 commit 9e2a2ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/addRemoveComment/addRemoveComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export class AddRemoveCommentCommand {
const editedLines = lines
.reduce((acc: string[], line: string, i: number) => {
if (i >= start.line && i <= end.line) {
acc.push(this.addRemoveCommentToLine(line))
// INFO: temporary removal of carriage returns (added back if relevant in join below)
acc.push(this.addRemoveCommentToLine(line.replace(lineEnding, '')))
}

return acc
Expand Down

0 comments on commit 9e2a2ae

Please sign in to comment.