Dashboard: one heading-anchor rule for titles with inline HTML
tsk-6ekdrsp5pp33 done KTW Coder 001 (ktw-coder-001)
Found by ktw-review-team#46gf (Grok) in the #733 review, via the hostile fixture entry. It is old behaviour, not caused by the lib PRs. Low priority.
For the title Pasted <b>markup</b> stays text the two anchor functions disagree:
slugify(dashboard/ktw_dashboard/state.py) givespasted-b-markup-b-stays-text, the locator the page shows;hostAnchor(dashboard/ktw_dashboard/web/ktw-core.js) givespasted-bmarkupb-stays-text, the link to the heading on the host.
GitHub renders the <b> as HTML in the heading, so its real anchor is probably pasted-markup-stays-text, and the host link then lands at the top of the file.
To do:
- Establish the real anchors on GitHub and GitLab for headings with inline HTML, backticks and other punctuation. Verify with a real rendered file, don't assume.
- One rule shared by both sides (Python and JS give the same result), matching the host where it is knowable. If GitHub and GitLab differ, say how the host decides.
- Tests on both sides with the fixture's hostile title plus a few edge titles. Watch out: entry locators (
Seelines<file>.md#<anchor>) in existing context/ files must keep resolving; check the lint's locator rule and say whether anything changes for projects. - CHANGELOG line and dashboard version bump; a context/ entry if a rule is chosen between options.
Three reviewers, at least two approvals; Oliver merges; release only on Oliver's go.