Skip to content

Commit 2e386fa

Browse files
authored
Merge pull request #12 from bryphe/bryphe/windows-fix-crlf
2 parents 4ea48b1 + 38598ef commit 2e386fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

expect_payload/ppx_expect_payload.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ let make ~kind payload ~(extension_id_loc:Location.t) =
5959
let rec first_line i =
6060
match get i with
6161
| None -> ()
62-
| Some (' ' | '\t') -> first_line (i + 1)
62+
| Some (' ' | '\t' | '\r') -> first_line (i + 1)
6363
| Some '\n' -> ()
6464
| Some _ -> first_line_has_stuff (i + 1)
6565
and first_line_has_stuff i =
@@ -70,7 +70,7 @@ let make ~kind payload ~(extension_id_loc:Location.t) =
7070
and rest_must_be_empty i =
7171
match get i with
7272
| None -> ()
73-
| Some (' ' | '\t' | '\n') ->
73+
| Some (' ' | '\t' | '\r' | '\n') ->
7474
rest_must_be_empty (i + 1)
7575
| Some _ ->
7676
Location.raise_errorf ~loc:body_loc

0 commit comments

Comments
 (0)