diff --git a/eleventy.config.md.js b/eleventy.config.md.js index 95393b56..283b4b6c 100644 --- a/eleventy.config.md.js +++ b/eleventy.config.md.js @@ -85,9 +85,17 @@ module.exports = function (eleventyConfig) { '
    \n' ); + markdownLibrary.renderer.rules.footnote_anchor = (tokens, idx, options, env, slf) => { + let id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf); + + if (tokens[idx].meta.subId > 0) id += `:${tokens[idx].meta.subId}`; + + /* ↩ with escape code to prevent display as Apple Emoji on iOS */ + return ` \u21a9\uFE0E`; + }; + const renderRules = { footnote_caption: ['[', '[Footnote #'], - footnote_anchor: [' { let defaultRender = markdownLibrary.renderer.rules[rule];