Skip to content

Commit

Permalink
Fix leading newline stripping logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dmbaturin committed Apr 11, 2024
1 parent 0fa9615 commit 71b8844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/toml_lexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ let trim_left_newline s =
(* Is it a file with Windows newlines? *)
if len > 1 then begin
match (String.get s 1) with
| '\n' -> String.sub s 2 (len - 1)
| '\n' -> String.sub s 2 (len - 2)
| _ ->
(* Better not to think why a string starts with a \r then. *)
s
Expand Down

0 comments on commit 71b8844

Please # to comment.