This rule identifies instances where a word is immediately repeated in text. It helps catch unintentional word duplication, which is a common typing error that can distract readers and reduce the professionality of your content.
The rule is particularly useful because repeated words are easy to miss during proofreading, especially in longer texts. While some word repetitions are intentional (like "very very"), most are typographical errors that should be corrected.
Examples:
✗ Incorrect:
- "The the quick brown fox" (flags "the the")
- "I went to to the store" (flags "to to")
- "She said that that wasn't true" (flags "that that")
✓ Correct:
- "The quick brown fox"
- "I went to the store"
- "She said that wasn't true"
Note: The rule uses a truncate
action, which means it will suggest removing one of the repeated instances when triggered. The rule works by matching any non-whitespace characters ([^\s]+
) and checking if they're repeated consecutively.