When using Kramdown in Jekyll and maybe others, you can write an en dash of em dash using plain hyphens.

You can escape this conversion by using code formatting.

Examples below

  • en dash
    • A -- B
    • A – B
  • em dash
    • A --- B
    • A — B