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 ten polytypo rules run, why each sits where it does, why quote-punctuation 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 invisible characters polytypo inserts, the Unicode spaces U+00A0 and U+202F, the non-breaking hyphen U+2011 and the word joiner U+2060, what inserts each, how to spot them, and the narrowNbsp option.