Skip to content

Footnote links can't be navigated to. #564

Description

@helloyou2012

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions