• Here’s an odd one:

    On my site, with the Markdown plugin activated, automatic paragraph breaks in comments no longer work. (For that matter, neither does entering the HTML tag for a paragraph break.) If I deactivate the Markdown plugin, the paragraph breaks come back. The problem is specific to comments. Paragraph breaks in original posts work just fine.

    Anyone have any idea what could be causing this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter sgerber

    (@sgerber)

    Hi, ColdForged.

    I’m using 1.01a. I believe that is the latest version.

    Yes, PHP Markdown 1.0.1a is the latest version.

    The Markdown syntax on paragraphs and line breaks says:

    When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

    Because of this, Markdown works well with “hard-wrapped” text paragraphs.

    Maybe I should add that to break the text into paragraphs (instead of line breaks), you need to leave an empty line between the two paragraphs.

    Thread Starter sgerber

    (@sgerber)

    Michael, thanks for responding. I just tried both of those techniques — to no avail. The line single return and double return (empty line) are both completely ignored.

    If you want to see this for yourself, my blog is at:

    https://www.stevegerber.com/sgblog

    Leave a comment to any post and you’ll see what’s going on.

    In case it’s any help (which seems doubtful), I have two other plugins running: Ir2Spam and TimeZone.

    I see what it is now. It’s a bug that slipped in version 1.0.1a, because of my lack of testing I guess.

    What happens is that WordPress 1.5 now enforce a list of tags that can be inserted by the user in comments and strip those not in this list. This caused problems to Markdown because the automatic link syntax looks like a tag and was stripped prior Markdown filtering. To work around that in 1.0.1a, I’ve postponed the tag filter until after Markdown has done it’s work. But now since <p> is not an allowed tag for user input, it strips it, along <blockquote> and some other.

    I’m not sure what to do exactly yet. I guess I could completely disable the tag filter. If you want to do that now, you can remove or comment line 56 in markdown.php:

    add_filter('comment_text', 'wp_filter_kses', 45);

    Thread Starter sgerber

    (@sgerber)

    Michael: I upgraded to WordPress 1.5.1 and installed the version of Markdown (1.01) included with that package. It seems to work perfectly.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Markdown ignores paragraph breaks in comments’ is closed to new replies.