WordPress.org

Ready to get started?Download WordPress

Forums

Markdown on Save Improved
[resolved] PHP Markdown's issue with the way WordPress processes text (4 posts)

  1. Aahan Krish
    Member
    Posted 1 year ago #

    PHP Markdown has a small problem with the way WordPress processes text, which I noticed in the upcoming WordPress flagship theme Twenty Thirteen.

    Wondering if the issue could be fixed on PHP Markdown's end, I shared a small bug report with the author: https://github.com/michelf/php-markdown/issues/73 (I described the issue in detail there, please take a look.)

    The issue persists with the plugin too (obviously, as it uses PHP Markdown). Any idea as to how this can be fixed?

    http://wordpress.org/extend/plugins/markdown-on-save-improved/

  2. Matt Wiebe
    Member
    Plugin Author

    Posted 1 year ago #

    Aahan, this is an issue with the assumptions that WordPress makes about the state of its content, and how MoSI works.

    WordPress assumes that there will be no p tags (since that's the way WP normally does things) and that's the assumption that Twenty Thirteen is making when it appends the date to an aside post format. It thinks that the date will simply be caught up in the last paragraph, but instead, since MoSI creates p tags, it winds up outside of the last paragraph.

    This could be worked around if need be, but it's not really a plugin bug.

  3. Aahan Krish
    Member
    Posted 1 year ago #

    Well, do you know any work around Matt? I tried in vain.

  4. Matt Wiebe
    Member
    Plugin Author

    Posted 1 year ago #

    Asking the Markdown Extra author to fix this is the wrong approach. It's not a problem with Markdown Extra, it's the clash of assumptions I already outlined above. Basically you need to strip the p tags created by Markdown, and then re-add the wpautop filter that MoSI removes.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic