Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/Eol_compat.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ let normalize_eol ?(exclude_locs = []) ~line_endings s =
normalize_segment ~seen_cr:0 i (String.length s) ;
Buffer.contents buf
| (start, stop) :: xs ->
normalize_segment ~seen_cr:0 i start ;
Buffer.add_substring buf s ~pos:start ~len:(stop - start) ;
loop xs stop
if i < stop then (
if i < start then normalize_segment ~seen_cr:0 i start ;
Buffer.add_substring buf s ~pos:start ~len:(stop - start) ;
loop xs stop )
else loop xs i
in
loop exclude_locs 0