jonschlinkert / markdown-toc

API and CLI for generating a markdown TOC (table of contents) for a README or any markdown files. Uses Remarkable to parse markdown. Used by NASA/openmct, Prisma, Joi, Mocha, Sass, Prettier, Orbit DB, FormatJS, Raneto, hapijs/code, webpack-flow, docusaurus, release-it, ts-loader, json-server, reactfire, bunyan, husky, react-easy-state, react-snap, chakra-ui, carbon, alfresco, repolinter, Assemble, Verb, and thousands of other projects.
https://github.com/jonschlinkert
MIT License
1.64k stars 706 forks source link

inline code is stripped, even with --no-stripHeadingTags #170

Open trusktr opened 3 years ago

trusktr commented 3 years ago

Using the --no-stripHeadingTags:

Input:

## The `<log-in>` element

Expected output:

  * [The `<log-in>` element](#the-log-in-element)

Actual output:

  * [The `` element](#the-log-in-element)

Without the --no-stripHeadingTags option, the tag is still erroneously treated as an HTML tag:

With the same input, the actual output is:

  * [The `` element](#the--element)