pub fn normalize(text: &str) -> StringExpand description
Strip BOM and normalize CRLF → LF in already-decoded text.
This is the shared normalization logic used by both the parser pipeline
(via preprocess) and the snapshot rewriter (which reads files as
&str and needs matching byte offsets).