fix(markdown): align heading slugs with GitHub anchors
SE
6d ago+12+12+01234567890123456789-1-1-0123456789
Summary
GitHub heading slug behavior
+ keep variation selectors used in emoji presentation
- omit Unicode Other_Number characters such as ² and ½
Closes #190. This keeps generated internal links aligned with GitHub's heading anchors for the reported Unicode cases.
Evidence
- Before:
❤️ Loveproduced#-loveinstead of GitHub's#️-love;x² formularetained²although GitHub removes it. - After: regression assertions cover
❤️ Love,2️⃣ Second, andx² formula ½. cargo test -p anydoc --locked --offline: 286 unit tests passed; integration tests 2 + 1 passed; 9 snapshot tests passed, 1 ignored; doc tests 0.cargo fmt --all -- --check: passed.
Merge Danger
Door: Two-way; the change can be reverted in one commit.
Blast Radius: Narrow; only GitHub-compatible heading fragment generation changes.
Summary by cubic
Aligns markdown heading slug generation with GitHub's anchor behavior so internal links to headings with Unicode edge cases resolve correctly. Fixes #190.
- Keeps variation selectors used in emoji presentation, so
❤️ Lovenow slugs to#️-love. - Removes Unicode Other_Number characters, so
x² formula ½now slugs to#x-formula-. - Adds the
unicode-propertiesdependency to detect the character category.