Closed mashdot closed 3 years ago
I'm unable to reproduce this error. Just tried this code snippet and it works fine:
var md = require('markdown-it')()
.use(require('markdown-it-footnote'));
console.log(md.render(`
Something[^1] something else
[^1]: blah blah
`.trim()));
Please show a minimal example of the code that produces this error.
Just for future seekers, it appears to be related to Nunjucks template processing in 11ty.
I don't have an answer why yet, but at least I know it is not caused by markdown-it-footnote directly.
That's usually caused by missed second param of .parse()
call.
Oh? How would I resolve this?
Discovered more about the issue. I used to use .md files as my layouts, which included nunjucks and this was parsed with 11ty. For some reason this has stopped working. So changed the extension to .njk which forces nunjucks parsing first and I no longer get the above issue.
Recently I am unable to use Normal Footnotes with references.
This causes as
Cannot read property 'type' of undefined
error which then points to:node_modules/markdown-it-footnote/index.js:338:49
Which is:
However, your Inline Footnotes do still work fine and cause no errors.
Any ideas?