WordPress.org

Ready to get started?Download WordPress

Forums

WP-Markdown
[resolved] Backslashes are disappearing on HTML->Markdown (8 posts)

  1. thehoagie
    Member
    Posted 2 years ago #

    The backslash character is not being properly preserved when the document is converted from HTML to Markdown syntax. Markdown syntax says that the backslash is a special character, so I escape with with a backslash, e.g "\\"

    When the post is saved in the editor, and refreshed, only one backslash remains. When the post is saved again the editor shows no backslashes. Each time the post is saved, the conversion forgets one backslash in each grouping.

    http://wordpress.org/extend/plugins/wp-markdown/

  2. Stephen Harris
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for reporting this. I shall look into it and release a fix sometime next week.

  3. Stephen Harris
    Member
    Plugin Author

    Posted 2 years ago #

    This issue should have been solved in the lastest update. Backslashes were being (unnecessarily) stripped before being displayed in the editor.

    Backslashes are special characters, but do not need to be escaped themselves.

  4. thehoagie
    Member
    Posted 2 years ago #

    Thanks so much Stephen. I used a single backslash, and it is preserved upon saving and reloading the post editor. I appreciate the quick turnaround on the update. Keep up the great work on the plugin!

  5. moose123
    Member
    Posted 2 years ago #

    Hi,

    I'm having a similar problem with markdown links. I'm running v1.1.2 of the plugin with WP multisite 3.3.2.

    When I save a draft of my post or page, the square brackets around the link text get escaped and the link breaks. So this:

    [Link test](http://wordpress.org "WordPress")

    Ends up like this:

    \[Link test\](http://wordpress.org "WordPress")

    I appreciate any suggestions.

  6. moose123
    Member
    Posted 2 years ago #

    Update

    I discovered that this only happens when there is link title text in the link. So when I removed "WordPress" from the above example, the markdown syntax remained and the links work.

    BTW, this is a great plugin. Thank you for writing it.

  7. Stephen Harris
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Moose123 - thanks for the update, I think this issue may be related:

    https://github.com/stephenh1988/WP-MarkDown/issues/1

    Not all MarkDown syntax appears to be supported (I'm using a third-party php markdown parser, and another HTML to markdown converter).

    Unfortunately I'm not able to give this plug-in my full attention at the moment, but I will look into and release an update as soon as possible.

  8. moose123
    Member
    Posted 2 years ago #

    Hi Stephen,

    Thanks for the response. I just won't use the title text for now. Not a huge deal.

    Cheers.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic