Problem: Footnote definition elements have their id prefixed with user-content- twice
(id="user-content-user-content-fn-1"), while the backref link's href only gets the prefix once (#user-content-fn-1).
The href and target id no longer match, so clicking a footnote goes nowhere.
Root cause: Both remark-rehype and rehype-sanitize default their clobberPrefix to user-content-, and the two stages
stack, producing a doubled prefix on ids.
Fix: Disable clobberPrefix on rehype-sanitize so remark-rehype remains the single source of prefixing, keeping ids and
hrefs in sync.
Would appreciate a review — thanks!
Originally posted by @helloyou2012 in #563 (comment)
Problem: Footnote definition elements have their id prefixed with user-content- twice
(id="user-content-user-content-fn-1"), while the backref link's href only gets the prefix once (#user-content-fn-1).
The href and target id no longer match, so clicking a footnote goes nowhere.
Root cause: Both remark-rehype and rehype-sanitize default their clobberPrefix to user-content-, and the two stages
stack, producing a doubled prefix on ids.
Fix: Disable clobberPrefix on rehype-sanitize so remark-rehype remains the single source of prefixing, keeping ids and
hrefs in sync.
Would appreciate a review — thanks!
Originally posted by @helloyou2012 in #563 (comment)