Organisationsocaml-ppxocamlformat77b7b2

odoc-parser: consume CRLF in handle_last_newline handle_last_newline scans backward and matches '\n' immediately, leaving the preceding '\r' (if any) on the stripped string. Because deindent then splits on '\n' and rejoins with '\n', every '\r' on an intermediate line ends up followed by a '\n' — but the '\r' on the last line is bare, since String.concat puts no separator after the final element. The OCaml lexer's newline regex is '\r*\n', so a bare trailing '\r' falls through to the Illegal_character rule. This caused the Windows CI to fail on any {@ocaml[...]} block in a CRLF-checked-out file. Mirror handle_first_newline (which already eats a leading '\r' before matching '\n'): when handle_last_newline finds '\n', also drop a preceding '\r' so the full CRLF is consumed.

May 26 10:05 +00:00
fix-windows-crlf-codeblockBuild History
4m01s
*Variants labelled (experimental) are still undergoing testing; if they have failed it may be a bug in OCaml-CI.