markdown-toc icon indicating copy to clipboard operation
markdown-toc copied to clipboard

Anchor tags ID & name attributes should have same value

Open gmccullo opened this issue 4 years ago • 0 comments

When using insertAnchor:true the generated anchor tags have different ID & name attribute values. The link points to the name value, not the ID value. This causes validation errors on bad links. The ID and Name should have the same value, and the link should point to it. For example:


<!-- TOC depthFrom:3 insertAnchor:true -->
- [Theatres. Clubs. Churches. Schools.](#theatres-clubs-churches-schools)
<!-- TOC -->

<a id="markdown-theatres-clubs-churches-schools" name="theatres-clubs-churches-schools"></a>
#### Theatres. Clubs. Churches. Schools.

Should be:


<!-- TOC depthFrom:3 insertAnchor:true -->
- [Theatres. Clubs. Churches. Schools.](#theatres-clubs-churches-schools)
<!-- TOC -->

<a id="theatres-clubs-churches-schools" name="theatres-clubs-churches-schools"></a>
#### Theatres. Clubs. Churches. Schools.

gmccullo avatar Feb 12 '21 06:02 gmccullo