pub fn normalize(input: &[u8]) -> StringExpand description
Normalize note body bytes before hashing.
Rules (ยง5.3):
- newlines normalized to
\n - trailing whitespace stripped from each line
- text Unicode-NFC normalized
- exactly one trailing newline
Input is treated as UTF-8; replacement chars are used for invalid bytes so hashing never fails on a partially-written file.