Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidvandusen/4669bbd921a9c709b9b112664252bf85 to your computer and use it in GitHub Desktop.
Save davidvandusen/4669bbd921a9c709b9b112664252bf85 to your computer and use it in GitHub Desktop.
$ node
> const markdownIt = require('markdown-it')
undefined
> const markdownItTocAndAnchor = require('markdown-it-toc-and-anchor')
undefined
> markdownIt().use(markdownItTocAndAnchor.default).render('## Real heading\n\n##\n\nEmpty heading above')
TypeError: Cannot read property 'type' of undefined
at Array.<anonymous> (/node_modules/markdown-it-toc-and-anchor/dist/index.js:55:53)
at Core.process (/node_modules/markdown-it/lib/parser_core.js:51:13)
at MarkdownIt.parse (/node_modules/markdown-it/lib/index.js:523:13)
at MarkdownIt.render (/node_modules/markdown-it/lib/index.js:543:36)
at repl:1:50
at ContextifyScript.Script.runInThisContext (vm.js:50:33)
at REPLServer.defaultEval (repl.js:239:29)
at bound (domain.js:301:14)
at REPLServer.runBound [as eval] (domain.js:314:12)
at REPLServer.onLine (repl.js:440:10)
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment