Home

Awesome

remark-lint-check-toc

remark-lint plugin to ensure that your Markdown headings capitalization is correct.

The plugin checks:

Install

npm install remark-lint-check-toc

Usage

Use like any other remark-lint plugin. Check out the remark-lint documentation for details.

Examples

When this rule is turned on, the following valid.md is ok:

* [Heading One](#heading-one)
  * [Sub Heading](#sub-heading)
* [Heading Two](#heading-two)

## Heading One

Lorem ipsum dolor sit amet.

### Sub Heading

Lorem ipsum dolor sit amet.

## Heading Two

Lorem ipsum dolor sit amet.

When this rule is turned on, the following invalid.md is not ok:

* [Heaing One](#heading-one)
  * [Sub Heading](#subheading)
* [heading Two](#heading-two)

## Heading One

Lorem ipsum dolor sit amet.

### Sub Heading

Lorem ipsum dolor sit amet.

## Heading Two

Lorem ipsum dolor sit amet.
1:3-1:29 warning Incorrect title or URL in TOC. Title: Heaing One, URL: #heading-one  check-toc remark-lint

2:5-2:31 warning Incorrect title or URL in TOC. Title: Sub Heading, URL: #subheading  check-toc remark-lint

3:3-3:30 warning Incorrect title or URL in TOC. Title: heading Two, URL: #heading-two check-toc remark-lint