Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a blog where I publish Linux tutorials. Some of the commands I listed have a -- before command-line arguments. e.g.: dpkg --get-selections.

The problem is that WordPress automatically switches -- to an – (–).

I know I could use the −− HTML entities, but the display is slightly different than the keyboard - sign.

What I want is to disable this behaviour of WP. Is there a way to solve this?

share|improve this question
    
Update: The function responsible for this is wptexturize... line 73 in formatting.php ... –  adrian7 Dec 18 '12 at 11:41
add comment

1 Answer

up vote 0 down vote accepted

Problem solved with this gist https://gist.github.com/4329321 .

[notexturize]--[/notexturize] worked like a charm.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.