Skip to main content

Module slugger

Module slugger 

Source
Expand description

GitHub-style heading-anchor slug generator. Mirrors npm github-slugger (used by rehype-slug): punctuation is stripped, NOT replaced, so 0.4.3 -> 043 and It's -> its (matches velite output).

For document-scoped dedupe (#patch-changes, #patch-changes-1, …) use Slugger.

Structs§

Slugger
Document-scoped slugger. Collisions get a -1, -2, … suffix.

Functions§

github_slugify
Compute the GitHub-style slug, ignoring dedupe. For document-wide dedupe, use Slugger::slug.