Skip to content

Commit 199ff81

Browse files
authored
Merge branch 'dev' into fix-2066
2 parents 2d69a10 + 32d1743 commit 199ff81

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/StringUtil.re

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ let unescape_linebreaks: string => string =
7474

7575
let trim_leading = (s: string): string => {
7676
s
77+
|> replace(regexp("\r\n"), _, "\n") // Normalize Windows line breaks
78+
|> replace(regexp("\r"), _, "\n") // Normalize old Mac line breaks
7779
|> replace(regexp("^[ ]*"), _, "") // Remove leading spaces at start
7880
|> replace(regexp("\n[ ]*"), _, "\n"); // Remove leading spaces after newlines
7981
};

0 commit comments

Comments
 (0)