• Resolved rnperki

    (@rnperki)


    I need to add some code to my website so installed SyntakHighlighter Evolved.

    However if I put in a — it gets converted to a single dash or em-dash I believe.

    Is there a setting in SyntaxHighlighter to stop this behaviour as people can’t copy my code

    I have tried a few things in wordpress to stop this behaviour

    Namely this in functions.php – but no avail

    /* Remove Double Dash 
    
    add_filter( 'run_wptexturize', '__return_false' );
    
    */
    
    remove_filter( 'the_content', 'wptexturize' );

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Renatho (a11n)

    (@renathoc)

    Hey!

    I tried to reproduce the issue, but I wasn’t able to. I went to a post, added a SyntaxHighlighter block with the following code:

    <div>a—-b</div>

    And it rendered in the same way in the frontend. If you still can reproduce it, could you send here the steps to reproduce it?

    And have you tried changing your theme or disable other plugins to confirm if it’s not a conflict with something else?

    Thread Starter rnperki

    (@rnperki)

    Thanks for your reply

    To recreate it, within a post I add new syntaxhighlighter block

    put in my code,

    However I have discovered in your example if I put <div>a–b</div>

    The dashes are preserved

    In my code I need to display –output and in this case it joins them together

    I select html as code format?

    Not sure if this sheds any light?

    Thread Starter rnperki

    (@rnperki)

    Even this forum does it!!

    Plugin Author Renatho (a11n)

    (@renathoc)

    I’m still not able to reproduce it. Could you put your code example here inside back quotes?

    Like —-output. Or even with that, your example is changed also here?

    Thread Starter rnperki

    (@rnperki)

    So, if I put this code ”’–output”’ into a code block and it merges it into a single dash.
    If I just put ”’–output”’ between

     tags the dashes are maintained. 
    
    If I put the dashes in between any other symbols like (---output) the dashes are also retained. 
    
    
    Plugin Author Renatho (a11n)

    (@renathoc)

    If I understood correctly, you want to add the following code in your site in a SyntaxHighlighter Code block:

    
    $ genie learn ospf -- testbed-file testbed1.yml -- output ospf1
    

    But when you save it, it’s saved as:

    
    $ genie learn ospf — testbed-file testbed1.yml — output ospf1
    

    Did I understand it correctly? If yes, I can’t reproduce this issue. It works well for me. Maybe is it something from your theme or another plugin? You could try to disable other plugins or change your current theme to confirm if it continues happening.

    Thread Starter rnperki

    (@rnperki)

    hi Renatho,

    That is exaclty my issue yes.

    Thank you for sticking with it.

    I have spoken to the Theme author and they say it’s coming from WordPress.

    I will go through my plugins and disable the theme and find out what’s doing it.

    Thread Starter rnperki

    (@rnperki)

    FIXED IT!!

    the culprit was this plugin

    WP YouTube Lyte

    Not sure why but will be in touch with them as it’s a very handy plugin

    Thanks for your great plugin, now I can use it for my code!

    Plugin Author Renatho (a11n)

    (@renathoc)

    Nice! I’m glad that you found the cause and could solve it! =)

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Double Dash converted to single dash’ is closed to new replies.