CMS

Steps to Solve Double Dash Problem in WordPress

In this tutorial, we will solve double dash problem in WordPress.

Are you facing double dash issue in WordPress post? Double dash gets converted into one longer dash.

To get normal double dash (–) in your content, follow these steps:

Open formatting.php file

wp-includes/formatting.php

Search following lines:

// Dashes and spaces

$dynamic[‘/—/’] = $em_dash;
$dynamic[ ‘/(?<=^|’ . $spaces . ‘)–(?=$|’ . $spaces . ‘)/’ ] = $em_dash;
$dynamic[‘/(?<!xn)–/’] = $en_dash;
$dynamic[ ‘/(?<=^|’ . $spaces . ‘)-(?=$|’ . $spaces . ‘)/’ ] = $en_dash;

and comment those line like shown below:

//$dynamic[‘/—/’] = $em_dash;
//$dynamic[ ‘/(?<=^|’ . $spaces . ‘)–(?=$|’ . $spaces . ‘)/’ ] = $em_dash;
//$dynamic[‘/(?<!xn)–/’] = $en_dash;
//$dynamic[ ‘/(?<=^|’ . $spaces . ‘)-(?=$|’ . $spaces . ‘)/’ ] = $en_dash;

Save and close it.

That’s it, now check your content.

In this tutorial we have learnt how our support engineer solve double dash problem in WordPress.

Related Articles