markdown-toc
markdown-toc copied to clipboard
wrong output and slug generated (using GFM as reference) when title contains a link
Input:
## Usage with [`@lume/element`](https://github.com/lume/element)
Expected output:
* [Usage with [`@lume/element`](https://github.com/lume/element)](#usage-with-lumeelement)
Actual output:
* [Usage with [`@lume/element`](https://github.com/lume/element)](#usage-with-lumeelementhttpsgithubcomlumeelement)
The slug does not have only the part that would be visible to the user reading the file. The slug should be based on the visible test (user doesn't see the URL).
Also maybe the link needs to be stripped, because it results in this:
- [Usage with @lume/element](#usage-with-lumeelement)