-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Invalid reference in [[toc]] with plugin markdown-it-custom-header-link #1979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
VuePress is using markdown-it-table-of-contents which is not able to understand markdown-it-custom-header-link syntax. Why do you need your link to be different from your header title? |
Hello @kefranabg, ### TEXT <Badge text="TBA 2.1+"/> The [[TOC]] will create a link to |
@brindosch your comment is not related to the initial issue. Please create a new issue, if you think you've found a bug. |
see also discuss at this Feature request |
I look at code of markdown-it-table-of-contents plugin. This plugin needs to be rewritten for badge and custom link works. No bug in this plugin! It just needs to be rewritten! |
Unfortunately we don't own this plugin, you can still try to open an issue to the toc repos, but i don't think maintainers will accept such a feature 🤔 |
Uh oh!
There was an error while loading. Please reload this page.
Bug report
if header has custom link (used plugin markdown-it-custom-header-link) then the table of content has a wrong link.
Steps to reproduce
install markdown-it-custom-header-link
add plugin to config
set header link
## title <!-- link -->
add [[toc]]
What is expected?
What is actually happening?
in [[toc]]wrong reference to this header
Other relevant information
How to resolve:
for reference in the vuepress [[toc]] need use token.attr.id or $page.headers.slug
Then all will work fine!
npx vuepress info
in my VuePress project:The text was updated successfully, but these errors were encountered: