sindresorhus / awesome-lint

Linter for Awesome lists
MIT License
609 stars 59 forks source link

ToC item does not match corresponding heading #121

Open margaretmz opened 4 years ago

margaretmz commented 4 years ago

I got this error on my README: https://github.com/margaretmz/awesome-tflite/blob/main/README.md

21:1 ToC item "Model zoo" does not match corresponding heading "Model zoo <img src="images/icons/zoo.png" width=48 height=48/>" remark-lint:awesome-toc

I can't find anything wrong with my markdown.

notlmn commented 4 years ago

The ToC item "Model zoo" in you example links to #model-zoo, but the actual heading has an ID of #model-zoo- because of the extra <img ...> you have at the end.

margaretmz commented 4 years ago

The README has multiple headings with the <image> tags at the end, why does only this one error out?

notlmn commented 4 years ago

It still does fail for the rest once you fix the first item, either way you should probably fix IDs in the ToC.

Also, yeah I think this is a bug and should be handled.

margaretmz commented 4 years ago

Thanks for your response - yes all headings with <img ...> at the end failed once I remove the first one. I moved all the icons below the headings to solve the issue. Also uncovered lots of other errors on remark-lint:double-link which I fixed.

margaretmz commented 4 years ago

I'm no longer blocked on this. Do I close the issue now or do you close it when you fix the bug of hidden additional errors?

notlmn commented 4 years ago

We can keep this open as this module probably should handle HTML inside headings similar to what GitHub does.

I'd leave this one out to the maintainers though.