• Resolved JP

    (@policieuxjp)


    Hi,

    I’m often writing dialogs in wordpress posts, then starting a line with “-“.
    The wordpress editor is then automatically transforming this “-” into a bullet point for a list.
    If I’m fast enough, Crtl-Z works and reverts to “-“, but it’s interrupting the flow (and I’m not always fast enough).

    I’m looking for a way to disable that automatic formatting behaviour.

    I’ve tried without success :
    – to use the official classic editor
    – to remove filters ( remove_filter(‘the_content’, ‘wptexturize’); and
    remove_filter(‘the_content’, ‘wpautop’); )
    – the plugin WP unformatted

    Thanks in advance for any ideas!
    JP

    • This topic was modified 2 years, 9 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    I think the behavior is due to markdown interpretation. I suspect a proper fix is rather messy. IDK, client side scripting is beyond my ken. Would you be willing to simply use double hyphens? That’s the simplest workaround. Double hyphens will be converted to emdash (—) characters, which I believe is more syntactically correct for your usage anyway.

    If you really need to have single hyphens, it’s be possible to add a filter that changes double hyphens or emdashes back to single hyphens on output. By using “the_content” filter.

    Thread Starter JP

    (@policieuxjp)

    Oh, man, thanks for that workaround, it’s perfect!
    I knew the triple hyphens to create a separator but did not know the rendering of a double one would be an emdash.
    Thanks for taking the time!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to disable automatic formatting : “-” becomes bullet point’ is closed to new replies.