Expand description
Pure string-to-string math-body normalisations.
Formatter canonicalisation applies these transforms to rendered output bytes.
Every function in this module takes a body slice and returns an
owned String. The opener / closer reconstruction lives in the
canonicalise caller — these helpers are pure body transforms.
Brace-balance probing is shared with super::scan so the
lint rule, the scanner, and the canonicalise gate agree on what
“balanced” means; see body_braces_balanced.
Functions§
- align_
env_ body - Lay out an aligning-environment body: split on
\\rows, then on&cells, pad each cell to its column’s max display width, emit with" & "separators and a" \\\n"row break. - body_
braces_ balanced - Walk
bodyand confirm{/}balance.