Apply all whitespace normalization substitutions to the given text.
Substitutions are applied in a specific order that avoids interference
between steps (e.g., DOS newlines must be normalized before backslash
continuation can be detected).
The backslash continuation step converts \\\n to the Private Use Area
character U+E000, which the lexer later recognizes as an explicit line break.
This approach avoids ambiguity with other uses of the backslash character.
Parameters
text: string
Raw input text
Returns string
Text with normalized whitespace, ready for typography preprocessing
Apply all whitespace normalization substitutions to the given text.
Substitutions are applied in a specific order that avoids interference between steps (e.g., DOS newlines must be normalized before backslash continuation can be detected).
The backslash continuation step converts
\\\nto the Private Use Area character U+E000, which the lexer later recognizes as an explicit line break. This approach avoids ambiguity with other uses of the backslash character.