//! Port of rules_core/normalize.ts: normalize input string.
use StateCore;
/// `UNNORMALIZED_NEWLINE_RE = /\r\n?/g` becomes `\n` and `NULL_RE = /\0/g` becomes U+FFFD
/// (<https://spec.commonmark.org/0.29/#line-ending>). Both regexes are single code units
/// (CR, LF, NUL), matched by hand in two passes as the two `replace` calls do.