Fix closing heading tag of manual heading anchor
This commit is contained in:
parent
b813634da0
commit
20d7386714
|
@ -66,7 +66,7 @@ module.exports = function (eleventyConfig) {
|
||||||
// Paired shortcode: Manual heading anchor
|
// Paired shortcode: Manual heading anchor
|
||||||
eleventyConfig.addPairedShortcode('headingAnchor', (title, hLevel, id=slugify(title)) => {
|
eleventyConfig.addPairedShortcode('headingAnchor', (title, hLevel, id=slugify(title)) => {
|
||||||
return `<div class="heading-wrapper h${hLevel}">
|
return `<div class="heading-wrapper h${hLevel}">
|
||||||
<h${hLevel} id="${id}">${title}</h2>
|
<h${hLevel} id="${id}">${title}</h${hLevel}>
|
||||||
<a class="heading-anchor" href="#${id}" aria-labelledby="${id}"><span hidden="">#</span></a>
|
<a class="heading-anchor" href="#${id}" aria-labelledby="${id}"><span hidden="">#</span></a>
|
||||||
</div>`;
|
</div>`;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue