Space before punctuation
space-before-punctuationon by defaultEnglish
A space before a period, comma or other mark, as in "word ."
Example
How to fix
Delete the space and attach the mark to the word before it.
Why it matters
English attaches punctuation to the word before it. A space before it ("word .", "(word) ,") can leave the mark alone at the start of the next line, and reads as a space left over from an edit. Periods, commas, semicolons, question marks and exclamation marks are checked. A colon ("Note : "), dots spaced out as an ellipsis or a leader in a table of contents (". . ."), a dot that starts the next word (".NET", ".5"), a mark after a number ("[ 1 , N ]" in a formula), code and URLs are not counted, nor are two or more spaces before the mark (a line laid out like a table).
What it does not flag
Colons, dots spaced out as an ellipsis or a leader (". . ."), a dot that starts a word (".NET", ".5"), a mark after a number or after two or more spaces, code and URLs are not reported.
Turning it off or relaxing it
Technical details
- Layer
- L1
- Status
- stable
- Severity
- warning
- Languages
- en
- Suited to
- business, technical, blog, legal, docs, academic, literature, speech
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).
| strict | error |
|---|---|
| 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
A space before "{mark}"
This page is built from the rule's definition file:packages/chaff/rules/space-before-punctuation.yaml