Skip to content

Search: Scrolling to heading after page load does not work, if heading contains a colon symbol #392

@yamgent

Description

@yamgent

Tell us about your environment

  • MarkBind Version: 1.10.0

What did you do? Please include the actual source code causing the issue.

When searching for the panel's heading "Guideline: Avoid Unsafe Shortcuts" in https://nus-cs2103.github.io/website-base/, the search jumps to the correct page, but the browser does not correctly scroll to the heading section.

This is because the heading's ID used by the search in MarkBind, and the heading's ID used by panel in vue-strap, are different. This mismatch in ID causes the scrolling logic to fail.

id generated by markdown-it-anchor (used by MarkBind): guideline-avoid-unsafe-shortcuts
id generated by vue-strap: guideline:-avoid-unsafe-shortcuts

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions