WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#8161 closed enhancement (fixed)

Spaced hyphens into spaced dashes

Reported by: joshuagoodwin Owned by: joshuagoodwin
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.7
Component: General Keywords: has-patch tested
Focuses: Cc:

Description

We all know that "---" and " -- " are changed into em-dashes (—), and that "--" is changed into an en-dash (—). But another bit of formatting really ought to take place - space-surrounded hyphens, like that one, ought to be turned into en-dashes by wp-includes/formatting.php. This is what Microsoft Word does, and - says Wikipedia - the style is adopted by many publishers. So this easy-to-implement feature really ought to be implemented - it happens with the likes of Textpattern.

Attachments (2)

formatting.php (68.5 KB) - added by joshuagoodwin 5 years ago.
Yes, yes, it's not in a .diff format. My sincere, sincere apologies for this. Changes in lines 47 & 48.
8161.diff (1.3 KB) - added by ionfish 5 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 joshuagoodwin5 years ago

  • Owner joshuagoodwin deleted

joshuagoodwin5 years ago

Yes, yes, it's not in a .diff format. My sincere, sincere apologies for this. Changes in lines 47 & 48.

ionfish5 years ago

comment:2 ionfish5 years ago

  • Keywords has-patch added
  • Milestone set to 2.8
  • Version set to 2.7

There you go.

comment:3 joshuagoodwin5 years ago

  • Owner set to joshuagoodwin
  • Priority changed from low to normal
  • Severity changed from trivial to normal

comment:4 Denis-de-Bernardy5 years ago

  • Keywords tested added; formatting.php removed

comment:5 automattor5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [10973]) Spaced hyphens into spaced dashes, props ionfish, fixes #8161

Note: See TracTickets for help on using tickets.