How to stop automate changing double dashes into single dash
-
As a technical blogger, my post contains a lot of double dashes ‘–‘, which I found it changing into single dash ‘-‘ automatically.
I googled and tried a lot of methods, but none of these working.
Could you help fix this problem, or I will have to give up writing blogs on WordPress.The blog I need help with is: (visible only to logged in users)
-
I thought I was direct contact the customer service team instead of posted on the forum.
This problem happened when I posted articles on wordpress.com.
I know it can be fixed when hosting my own WordPress server, but wordpress.com is not hosting on my own server.
What do I need to do to fix this? -
Hi gejianxin,
my post contains a lot of double dashes ‘–‘, which I found it changing into single dash ‘-‘ automatically.
Can you send a link to the post you are having trouble with on gejianxin.wordpress.com?
Also, are you using the new editor or the classic WP Admin dashboard for writing your posts?
I was direct contact the customer service team instead of posted on the forum.
These forums are where we provide support for WordPress.com sites using the Free plan :)
Just let me know which post you are working on and I’ll be happy to look into this for you.
-
Can you send a link to the post you are having trouble with on gejianxin.wordpress.com?
Here is the link
You can directly search for “-n, –number”, the single dash before “-number” is actually double dashes before I published it.
If you look carefully, you can see that the two dashes before “n” and “number” are silghtly different, the after one seems a little stronger and bigger, but it still a single dash.Also, are you using the new editor or the classic WP Admin dashboard for writing your posts?
It doesn’t matter what editor I use, because I tried them all, both the windows desktop program of latest version and WP admin build-in editor.
Even before I posted this ask-for-help subject, I drafted a post to test the double dash problem.
The problem still exists. -
Here are some information may help.
On standard/vanilla WordPress, anytime you type two (2) “dash” characters (ie. the minus symbol) on a post (and save), these dashes get automatically converted into “something else” (an em).
This sneaky text conversion performed behind the scenes by the WordPress engine is a “feature” offered by the wptexturize filter.
-
BTW: I typed two dashes in the quote below, which now turned into a single one.
my post contains a lot of double dashes ‘–‘
-
@gejianxin WordPress does try to convert two dashes into an emdash unless you’re using a preformatted text block.
I can see you’re using tables, which definitely makes it trickier. But I tested on my site, and if you’ll wrap your code with pre instead of b, like so, it does work:
<td><b>-?</b>, <b><pre>--help</pre></b></td>Note the “pre” sometimes gets its own formatting from your theme’s stylesheet, but the double dashes should remain. Perhaps you could find and replace?
-
Thank you for your help!
How thoughtful the wordpress engine is!
In order to correctly express my thoughts and not misleading anyone who has ever read my blog, I have to recorrect the article that wordpress corrected for me.I guess it’s time to say farewell to wordpress.
- The topic ‘How to stop automate changing double dashes into single dash’ is closed to new replies.