Fix closing heading tag of manual heading anchor

This commit is contained in:
Helen Chong 2024-06-10 17:30:48 +08:00
parent b813634da0
commit 20d7386714
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ module.exports = function (eleventyConfig) {
// Paired shortcode: Manual heading anchor
eleventyConfig.addPairedShortcode('headingAnchor', (title, hLevel, id=slugify(title)) => {
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>
</div>`;
});