Minor Wordpress Annoyances (Double Dashing)

I just recently realized that Wordpress automatically converts a double dash — into an em-dash, which looks like a double dash without a space between them. So irritating, especially when you are showing source code or command line examples in your post.

The solution is to open the SITE_ROOT/wp-includes/functions-formatting.php file and comment out these two lines:

$curl = str_replace(’ — ‘, ‘ — ‘, $curl);
$curl = str_replace(’–’, ‘–’, $curl);

The ironic thing is that you wouldn’t even see the double dash in those lines if I hadn’t already commented them both out.

But now, I can double dash away.

Leave a Reply