AP or Chicago; only applies when match is set to $title (default: AP).
exceptions
array
An array of strings to be ignored.
indicators
array
An array of suffixes that indicate the next token should be ignored.
threshold
float
The minimum proportion of words that must be (un)capitalized for a sentence to be considered correct (default: 0.8).
prefix
string
A constant prefix to ignore during case conversion.
vocab
bool
If false, disables all active vocabularies for this rule (default: true).
capitalization checks that the text in the specified scope matches the case
of match.
yaml
Copy
extends: capitalizationmessage: "'%s' should be in title case"level: warningscope: heading# $title, $sentence, $lower, $upper, or a pattern.match: $title# AP or Chicago; only applies when match is set to# $title.style: APexceptions: - ABC - add
The prefix option allows you to specify a constant prefix to ignore during
case conversion. For example,
yaml
Copy
extends: capitalizationmessage: "'%s' should be sentence-cased."scope: headingmatch: $sentence# sentence-cased, but allows for a common prefix:## E.g.,## a. This is my headingprefix: '^[a-z]\.\s'
In this example, ^[a-z]\.\s is used to ignore the common prefix.