We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Node version: v17.0.1 OS/version: Mac OS 11.6 Big Sur
v17.0.1
Mac OS 11.6 Big Sur
Eleventy version: 0.12.1 Template engine: Nunjucks
0.12.1
Nunjucks
Plugin module version: 1.1.0
1.1.0
PluginTOC renders everything inside the h(n) tag. Markdown-it generates permalinks by placing an a tag inside the h(n) tag.
h(n)
a
PluginTOC renders the text content of the h(n) tag and ignores any other markup inside it.
The text was updated successfully, but these errors were encountered:
I solved it by writing an 11ty filter, the ☍ is the permalink symbol:
// .eleventy.js eleventyConfig.addFilter("removeSymbol", function(value) { value.val = value.val.replace(/ ☍/g, ""); return value; });
This needs to be applied in the template:
{{ content | toc | safe | removeSymbol }}
Sorry, something went wrong.
No branches or pull requests
Environment
Node version:
v17.0.1
OS/version:
Mac OS 11.6 Big Sur
Eleventy
Eleventy version:
0.12.1
Template engine:
Nunjucks
Plugin
Plugin module version:
1.1.0
Description of the issue
PluginTOC renders everything inside the
h(n)
tag. Markdown-it generates permalinks by placing ana
tag inside theh(n)
tag.Desired output
PluginTOC renders the text content of the
h(n)
tag and ignores any other markup inside it.The text was updated successfully, but these errors were encountered: