Concepts
The guarantees behind polytypo: idempotency, rule order, locale resolution, the span model and round trip.
- The span model How html, markdown and yaml modes show the rules only the prose of a document, and why spans are joined with boundary markers instead of processed alone.
- Round trip In html, markdown and yaml modes the output is your input with a few substring replacements applied, and nothing is re-serialised.
- Idempotency Why transform(transform(x)) equals transform(x) is a contract in every runtime, and what it means for text that is already typeset.
- Rule order The fixed order in which the nine polytypo rules run, why each sits where it does, why ranges is off by default, and how options never reorder them.
- Locale resolution How the locale option becomes exactly one locale: exact match, alias, one region strip, and an error otherwise, never a fallback to English.
- Invisible characters The four characters polytypo inserts that you cannot see, U+00A0, U+202F, U+2011 and U+2060, what inserts each, how to spot them, and the narrowNbsp option.