fix(markdown): align heading slugs with GitHub anchors

SE
6d ago
+12-1

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: ❤️ Love produced #-love instead of GitHub's #️-love; x² formula retained ² although GitHub removes it.
  • After: regression assertions cover ❤️ Love, 2️⃣ Second, and x² 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 ❤️ Love now slugs to #️-love.
  • Removes Unicode Other_Number characters, so x² formula ½ now slugs to #x-formula-.
  • Adds the unicode-properties dependency to detect the character category.