We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2d69a10 + 32d1743 commit 199ff81Copy full SHA for 199ff81
src/util/StringUtil.re
@@ -74,6 +74,8 @@ let unescape_linebreaks: string => string =
74
75
let trim_leading = (s: string): string => {
76
s
77
+ |> replace(regexp("\r\n"), _, "\n") // Normalize Windows line breaks
78
+ |> replace(regexp("\r"), _, "\n") // Normalize old Mac line breaks
79
|> replace(regexp("^[ ]*"), _, "") // Remove leading spaces at start
80
|> replace(regexp("\n[ ]*"), _, "\n"); // Remove leading spaces after newlines
81
};
0 commit comments