• pbear

    (@pbear)


    I needed to use this plugin as a quick-and-dirty way to convert some pre-Markdown/HTML only posts into Markdown format. It basically does the job.

    However, as I believe was reported in this old post: Breaks Paragraphs, the plugin removes/ignores the paragraph breaks as indicated by newlines in the database. So your HTML-converted-to-Markdown text is more or less all joined together.

    My fix: in the function wpmarkdown_html_to_markdown() (about line 527 in wp-markdown.php) change:
    $markdown = $md->parseString( $html );
    to:
    $markdown = $md->parseString( nl2br($html) );

    While not perfect, I find it easier to clean up some extra carriage returns than try to find where to add them in again. Note: I didn’t test this as far as saving again. It’s just good enough for my purposes. Hope this helps someone else with the same problem.

    https://www.ads-software.com/plugins/wp-markdown/

  • The topic ‘Collapses paragraphs’ is closed to new replies.