A table-of-contents entry with no heading
toc-heading-mismatchon by defaultJapanese / English
A table of contents entry that matches no heading of the document
Example
How to fix
Update the entry to match the heading, or remove the entry for a section that is gone.
Why it matters
When the table of contents lists "3.2 Costs" and the text has no such heading, the reader cannot get there from the contents. It happens when a heading is renamed or a section removed and the contents are left as they were. Matching the entries against the headings is mechanical.
What it does not flag
Entries and headings are compared ignoring spaces, punctuation and case, and again without a leading number (1.2, 2-1) or a page number (.... 12). For a linked entry the link text is compared (broken-link checks where it points). When more than half of the entries match no heading, the contents are read as following another outline and nothing is reported. Only Markdown documents with headings are checked.
Turning it off or relaxing it
Technical details
- Layer
- L3
- Status
- stable
- Severity
- warning
- Languages
- Japanese and English
- Suited to
- business, technical, blog, legal, docs, academic, literature, speech
- Reads from the document
- markdown
Levels
Set a level for this rule under rules in chaff.yaml. With nothing set, it runs at the level its genre gives it (see By genre below).
| normal | warning |
|---|---|
| relaxed | info |
This rule has no limit to count to. A level sets how a finding is marked: relaxed keeps the finding and marks it a step lower.
By genre
- Runs by default in
- technical/spec, technical/readme, blog/tech, blog/essay, blog/owned-media, business/proposal, business/report, business/email, business/press-release, business/meeting-notes, legal/contract, legal/statute, legal/judgment, legal/patent, docs/manual, docs/faq, docs/glossary, academic/paper, literature/fiction, literature/essay, literature/poetry, literature/play, speech/address, speech/transcript
Message
No heading matches the contents entry "{entry}"
This page is built from the rule's definition file:packages/chaff/rules/toc-heading-mismatch.yaml