Skip to content

Commit 90a6bab

Browse files
author
Kapil Borle
committed
Use valid regex for getting lines
1 parent 6ee1639 commit 90a6bab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/features/DocumentFormatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ class PSDocumentFormattingEditProvider implements DocumentFormattingEditProvider
332332
}
333333

334334
private getNumLines(text: string): number {
335-
return text.split("\r?\n").length;
335+
return text.split(/\r?\n/).length;
336336
}
337337

338338
// TODO Remove method as it is not used anymore

0 commit comments

Comments
 (0)