I got you there, I too didn’t know there were n and m dashes “–” and “—”.
Anyways, the process of using one of these in my life was something like this:
- Search Google for “mdash”
- Use my eye scanning techinque to find any dash which looks longer than usual
- CTRL-C, CTRL-V
- life goes on
Tired of this repetitive process, I decided to replace n/m dashe with hyphen (-), those looked unfamiliar and rather creepy ( -example-), so I changed my mind again and decided to use double hyphens (- -).
Surprise! WordPress turns automatically any 2 consecutive and uspaced hyphens into n-dashs and any 3 hyphens into m-dashs, like this see:
- 2 dashes: –
- 3 dashes: —
Well, it’s not that simple, so for those of you who really want to know the origin of things, check the wptexturize() function, specially around thoses lines.
If you don’t like this behaviour, and your life depends on the hyphens remaining hyphens, you can use this small plugin:
<?php /* Plugin Name: Remove the wptexturize filter */ remove_filter( 'the_title' , 'wptexturize' ); remove_filter( 'the_content' , 'wptexturize' ); remove_filter( 'the_excerpt' , 'wptexturize' ); remove_filter( 'comment_text' , 'wptexturize' ); remove_filter( 'list_cats' , 'wptexturize' );
Name the file as you want but make sure you place it under the wp-content/plugins directory and you enable the plugin in your awesome website dashboard.
Original Link: http://www.kadimi.com/en/wordpress-dashes
Visits: 399