File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/commands/addRemoveComment Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export class AddRemoveCommentCommand {
5959 CRLF = `\r\n` ,
6060 LF = `\n`
6161 }
62- const lineEnding = new RegExp ( LineEndings . CRLF + `$` ) . test ( text )
62+ const lineEnding = new RegExp ( LineEndings . CRLF ) . test ( text )
6363 ? LineEndings . CRLF
6464 : LineEndings . LF
6565
@@ -68,8 +68,7 @@ export class AddRemoveCommentCommand {
6868 const editedLines = lines
6969 . reduce ( ( acc : string [ ] , line : string , i : number ) => {
7070 if ( i >= start . line && i <= end . line ) {
71- // INFO: temporary removal of carriage returns (added back if relevant in join below)
72- acc . push ( this . addRemoveCommentToLine ( line . replace ( lineEnding , '' ) ) )
71+ acc . push ( this . addRemoveCommentToLine ( line ) )
7372 }
7473
7574 return acc
You can’t perform that action at this time.
0 commit comments