Linting fails because of the <!-- omit from toc --> comment.
$ pnpx awesome-lint
✖ Linting
README.md:11:3
✖ 1:1 Missing or invalid Table of Contents remark-lint:awesome-toc
✖ 11:3 Invalid list item link URL remark-lint:awesome-list-item
✖ 12:3 Invalid list item link URL remark-lint:awesome-list-item
✖ 13:3 Invalid list item link URL remark-lint:awesome-list-item
✖ 14:3 Invalid list item link URL remark-lint:awesome-list-item
✖ 15:3 Invalid list item link URL remark-lint:awesome-list-item
✖ 16:3 Invalid list item link URL remark-lint:awesome-list-item
✖ 17:3 Invalid list item link URL remark-lint:awesome-list-item
✖ 18:3 Invalid list item link URL remark-lint:awesome-list-item
✖ 19:3 Invalid list item link URL remark-lint:awesome-list-item
✖ 20:3 Invalid list item link URL remark-lint:awesome-list-item
✖ 21:3 Invalid list item link URL remark-lint:awesome-list-item
✖ 22:3 Invalid list item link URL remark-lint:awesome-list-item
✖ 23:3 Invalid list item link URL remark-lint:awesome-list-item
14 errors
(This comment is useful because it tells the Markdown All in One VSCode extension to exclude it from the auto-generated table of contents, as per Awesome Rules.)
After applying this patch, no more errors are printed.
After:
$ pnpx awesome-lint
✔ Linting
Note that the toString() function does accept an option called includeHtml, but unfortunately that did not help in this case. So this regex seemed like the next best alternative.
Given an Awesome Markdown file that includes the following:
Linting fails because of the
<!-- omit from toc -->
comment.(This comment is useful because it tells the Markdown All in One VSCode extension to exclude it from the auto-generated table of contents, as per Awesome Rules.)
After applying this patch, no more errors are printed.
After:
Note that the
toString()
function does accept an option calledincludeHtml
, but unfortunately that did not help in this case. So this regex seemed like the next best alternative.