Function normalise_final_newline
fn normalise_final_newline(page: &str) -> StringExpand description
Ends a page with exactly one newline.
This is the one byte of a pragma page that framing-preservation does not
leave to the author. The blind spot was that splice copies the framing —
the final newline included — from the file on disk, so a page whose last
byte had been stripped produced expected bytes that were also missing it,
and --mode check compared them equal. check and write agreed, so
nothing was ever inconsistent; a byte of formatting was simply unenforced,
and a text file without its final newline is the kind of thing every diff
tool complains about and no gate noticed. Normalising here means write
fixes it and check reports it as drift on the last line.