• Hi all;

    I’d need to tweak the way wpautop (wp-includes/formatting.php) filters my theme’s comments.
    The default behaviour, if I’m not mistaken, is inserting a br tag for single line breaks, and new paragraph p tags for double line breaks, with the option of either keeping the br as well.

    What I need (for layout purposes) is the filter to make paragraphs on single line breaks. That would mean inserting <p /><p> instead of <br /> (the filter already puts opening and closing p tags around the content).
    I think this shouldn’t be that difficult, but the filter uses a lot of regular expressions which I honestly can’t decipher.

    I can handle the rest (deactivating the default filter and setting up my own), but I really need some help with the RegEx.
    I would really appreciate if anyone can help me with this one.
    Cheers!

  • The topic ‘[Filter: wpautop] make paragraphs on line break’ is closed to new replies.