-
Notifications
You must be signed in to change notification settings - Fork 73
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
Advice for keeping permalink symbol token stable #98
Comments
Ouuh, good catch, the legacy version should be identical in all points, I'll publish a patch for this As for your question, I think that including the toc plugin before markdown-it-anchor would solve the problem, since the toc would be generated before the anchors are added to the token stream? |
The legacy permalink is compliant with the actual legacy implementation in 8.0.5! |
We are using the |
@valeriangalliat Is it possible to add a |
Ah I see, makes sense. |
…meta Support permalink symbol token meta (#98)
We were using
html_block
token for permalink symbol in v7.x:markdown-it-anchor/index.js
Line 24 in 828401d
Since v8.x, it's changed to
html_inline
(which is not the "exact" legacy implementation):markdown-it-anchor/permalink.js
Line 31 in f5c0844
It's an internal / undocumented breaking change, which might break some plugins that depend on markdown-it-anchor.
For example, we have a custom toc plugin, allowing
html_inline
in the heading to be displayed in the toc headers. Now we need one more step to filter the symbol token.This issue is just a reminder in case next time you may change it unintentionally.
You can close it after reading 😄 @valeriangalliat
BTW, do you have any advices for how to filter the permalink symbol token, and keep other
html_inline
tokens?The text was updated successfully, but these errors were encountered: