Fix comment for manual heading anchor

This commit is contained in:
2025-05-08 23:39:11 +08:00
parent fd9ec71d91
commit 4cf577d133

View File

@@ -7,7 +7,7 @@ export default function(eleventyConfig) {
// Shortcode: <cite> tag
eleventyConfig.addShortcode('cite', (str) => `<cite>${str}</cite>`);
// MShortcode: anual heading anchor
// Shortcode: Manual heading anchor
eleventyConfig.addPairedShortcode('headingAnchor', (title, hLevel, id=slugify(title)) => {
return `<div class="heading-wrapper h${hLevel}">
<h${hLevel} id="${id}">${title}</h${hLevel}>
@@ -43,4 +43,4 @@ export default function(eleventyConfig) {
// Shortcode: Responsive image
eleventyConfig.addShortcode('src', (file, width) => getSrc(file, width));
eleventyConfig.addShortcode('srcset', (file, widths) => getSrcset(file, widths));
}
}