Support non-Latin heading slugs in non-Markdown markup
Background
MarkupHeadingAnchorFilter, introduced in !238950 (merged) and !241282 (merged), generates
heading IDs and anchor links for non-Markdown markup (Org-mode, RST, MediaWiki, etc.).
It uses ActiveSupport::Inflector.parameterize to derive slugs from heading text.
Problem
Since parameterize strips all non-Latin characters,
headings written in non-Latin scripts fall back to the tag name (e.g., h1, h2).
The resulting anchors give no indication of which heading they point to.
This is inconsistent with Markdown rendering, where heading slug generation is Unicode-aware.
Solution
This MR replaces parameterize with Unicode-aware slug generation,
modelled after the Markdown parser Comrak's
anchorize().
References
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.