mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-04 12:00:02 +00:00
fix: Footnote in heading (#89)
This commit is contained in:
parent
717492ba19
commit
18b4be3d43
16
.eleventy.js
16
.eleventy.js
@ -140,6 +140,22 @@ module.exports = function (eleventyConfig) {
|
||||
|
||||
return defaultLinkRule(tokens, idx, options, env, self);
|
||||
};
|
||||
// Footnote heading fix (till the upstream releases the fix)
|
||||
md.renderer.rules.render_footnote_anchor_name = (
|
||||
tokens,
|
||||
idx,
|
||||
options,
|
||||
env
|
||||
) => {
|
||||
var n = Number(tokens[idx].meta.id + 1).toString();
|
||||
var prefix = "";
|
||||
|
||||
if (env && typeof env.docId === "string") {
|
||||
prefix = "-" + env.docId + "-";
|
||||
}
|
||||
|
||||
return prefix + n;
|
||||
};
|
||||
});
|
||||
|
||||
eleventyConfig.setLibrary("md", markdownLib);
|
||||
|
Loading…
x
Reference in New Issue
Block a user