Units spaced two ways
unit-spacing-consistencyon by default (info)Japanese / English
A number and its unit spaced in some places and not others (5 GB, 5GB)
Example
How to fix
Match the way the rest of the document writes units.
Why it matters
A document writing "5 GB" in one place and "5GB" in another makes the reader wonder whether the difference means something, looks pasted together, and splits a search. chaff does not pick a side; unit by unit, it points at the way the document uses less.
What it does not flag
Only the unit symbols on chaff's list are read. One-letter symbols (m, s, g), the percent sign and temperatures (°C) are left out, since many styles write them unspaced on purpose. Units written as words (5 hours), code, and numbers inside versions or addresses (1.2.3GB) are not read. Each unit is compared with itself, so "5 GB" next to "500ms" is not a mix. A no-break space counts as a space. When the less common way is over a third, or the two are equally common, the document is read as using both on purpose.
Turning it off or relaxing it
Technical details
- Layer
- L2
- Status
- stable
- Severity
- info
- Languages
- Japanese and English
- 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 | reported while the less common way is at most 49% of the units |
|---|---|
| normal | reported while the less common way is at most 34% of the units |
| relaxed | reported while the less common way is at most 20% of the units |
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
"{written}" here, where the document usually writes this unit like "{usual}" ({count} of {of})
Rewrite depth (chaff fix-plan --depth): light — words and sentences; the structure and the voice stay
Sources
This page is built from the rule's definition file:packages/chaff/rules/unit-spacing-consistency.yaml