Skip to content

Use an em dash instead of an en dash (EK00032)

An em dash sets off a break within a sentence, while an en dash joins ranges. Learn why to choose the right dash and keep documentation consistent.

An em dash (—) sets off a break or aside within a sentence, so use it there in place of the shorter en dash (–). EkLine flags an en dash used where an em dash belongs (rule EK00032).

When do you use an em dash instead of an en dash?

Section titled “When do you use an em dash instead of an en dash?”

The en dash (–) and em dash (—) have distinct jobs: the en dash joins ranges and numbers, while the em dash marks a break or an aside within a sentence. Using the wrong one for a parenthetical break reads as an editing slip and mixes two conventions on the same page. Choosing the em dash for these breaks keeps your punctuation consistent and correct.

EK00032 matches an en dash (–) used where an em dash (—) belongs.

  • Incorrect: The CLI – the fastest option – runs locally.
  • Correct: The CLI—the fastest option—runs locally.
  • Incorrect: EkLine reviews your docs – automatically – on every commit.
  • Correct: EkLine reviews your docs—automatically—on every commit.

Replace the en dash with an em dash (—) wherever it marks a break or an aside within the sentence.

What is the difference between an em dash and an en dash?

Section titled “What is the difference between an em dash and an en dash?”

The em dash (—) marks a break or aside within a sentence, while the en dash (–) joins ranges and numbers. Using each for its own job keeps your punctuation consistent.

Use the en dash for number ranges, such as “5–10 minutes”, and for negative numbers. Use the em dash for a break within a sentence.

PropertyValue
Rule IDEK00032
CategoryConsistency
Default severityError
Enabled by defaultNo

To keep an en dash on one line, add an inline comment:

<!-- ekline-ignore-next-line EK00032 -- en dash marks a number range -->
The process takes 5–10 minutes.

To disable the rule across your project, add it to the ignore list in your configuration file.

  • EK00034 — Use an en dash for negative numbers
  • EK00028 — Avoid spaces before or after a dash