Closed VladimirCharkot closed 3 years ago
> let markdownIt = require('markdown-it') > let markdownItFootnote = require('markdown-it-footnote') > let md = markdownIt() > md.parse('') [] > md.use(markdownItFootnote) > md.parse('') Uncaught TypeError: Cannot read property 'footnotes' of undefined at Array.footnote_tail (/Users/vlad/Documents/Codes/esde/node_modules/markdown-it-footnote/index.js:293:20) at Core.process (/Users/vlad/Documents/Codes/esde/node_modules/markdown-it/lib/parser_core.js:51:13) at MarkdownIt.parse (/Users/vlad/Documents/Codes/esde/node_modules/markdown-it/lib/index.js:523:13) > md.render('') ''
I have to disable markdown-it-footnote if I need to work with the token stream. Is this intended?
Thanks!
The crash occurs trying to access state.env.footnotes as state.env is undefined
state.env.footnotes
state.env
.parse MUST have second param. See src & api docs.
.parse
I have to disable markdown-it-footnote if I need to work with the token stream. Is this intended?
Thanks!