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 57e285e commit f911a50
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/commands/addRemoveComment/addRemoveComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ export class AddRemoveCommentCommand {
const editedLines = lines
.reduce((acc: string[], line: string, i: number) => {
if (i >= start.line && i <= end.line) {
// INFO: \r has to be removed due to line ending differences between Windows and Unix systems
acc.push(this.addRemoveCommentToLine(line.replace(/\r/, '')))
acc.push(this.addRemoveCommentToLine(line))
}

return acc
Expand Down

0 comments on commit f911a50

Please sign in to comment.