Skip to main content

section_slugs

Function section_slugs 

Source
pub fn section_slugs(sections: &[String]) -> Vec<String>
Expand description

Per-section unique Typst labels, one per entry in sections, in order. Derived from section_slug with collisions resolved by a -2, -3, … suffix so two files that normalise to the same base slug still get distinct, non-conflicting labels. Deterministic for a given ordered sections, so the anchor side (assembly) and the link side (conversion) agree.