You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When localizing documents, it is necessary to retain the original anchor points, e.g.
# Getting Started
in Chinese
# 快速开始 {#getting-started}
In this case, I need to use markdown-it-attrs, but the source code uses markdown-it-anchor, and attrs needs to be executed before anchor.
markdown-it-anchor is described in the documentation:
markdown-it-anchor is designed to reuse any existing id, making markdown-it-attrs a perfect fit for this use case. Make sure to load it before markdown-it-anchor!
Reproduction
None
Expected behavior
None
System Info
None
Additional context
I think there are two solutions:
add markdown-it-attrs to the source code
add a pre-selection for loading plugins
// pre configif(options.preConfig){options.preConfig(md)}// custom pluginsmd.use(componentPlugin).use(highlightLinePlugin).use(preWrapperPlugin).use(snippetPlugin,srcDir).use(hoistPlugin).use(containerPlugin).use(extractHeaderPlugin).use(linkPlugin,{target: '_blank',rel: 'noopener noreferrer',
...options.externalLinks})// 3rd party plugins.use(anchor,{
slugify,permalink: anchor.permalink.ariaHidden({}),
...options.anchor}).use(toc,{
slugify,includeLevel: [2,3],format: parseHeader,
...options.toc}).use(emoji)// ...// apply user configif(options.config){options.config(md)}
Describe the bug
When localizing documents, it is necessary to retain the original anchor points, e.g.
in Chinese
In this case, I need to use markdown-it-attrs, but the source code uses markdown-it-anchor, and attrs needs to be executed before anchor.
markdown-it-anchor is described in the documentation:
Reproduction
None
Expected behavior
None
System Info
Additional context
I think there are two solutions:
markdown-it-attrs
to the source codeValidations
The text was updated successfully, but these errors were encountered: