Skip to content

markdown-it-anchor@5.0.0 generates anchor IDs differently #413

Description

@yamgent

Upgrading markdown-it-anchor from 4.0.0 to 5.0.0 causes it to generate the heading anchors differently (because they no longer rely on string@3.3.3 to generate the anchor IDs).

The way they convert the headings to anchor, causes non-alphanumeric characters to be converted to ASCII code equivalent (so for example, "Guideline: Avoid Unsafe Shortcuts" becomes guideline%3A-avoid-unsafe-shortcuts).

We cannot address such anchor IDs in jQuery (the '%' seems to be throwing errors about unrecognized expressions). So the bug in #392 will resurface again, because the fix for that issue uses jQuery to scroll to the correct heading.

We will either need to fix markdown-it-anchor to generate the anchors differently, or find a way around the jQuery problem.

<searchbar :data="searchData" placeholder="Search" :on-hit="searchCallback"></searchbar>

<!-- MarkBind needs to be fixed for this to work -->
## Another header,

<!-- vue-strap needs to be fixed for this to work -->
<panel header="## Header:, with comma" expand>
  Panel content
</panel>

Metadata

Metadata

Assignees

Labels

p.HighTo be done in the next few releases

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions