Removing extra newlines (4 posts)

  1. Matt Mullenweg
    Posted 12 years ago #

    In includes/functions change $br = 1 to $br = 0 in the autop function.

  2. westpointer
    Posted 11 years ago #

    That function is now in functions-formatting.php

  3. OtherMichael
    Posted 11 years ago #

    This works like a charm. Hope to see it added to Options someday; it's too important to on be able to change it by editing the code; too many users will be turned off by it.

  4. 205guy
    Posted 11 years ago #

    I guess I get to update the info for the 1.5 release, since I just had to figure it out:

    The file is wp-includes/functions-formatting.php.

    The fuction is wpautop (3rd from the top in my distro).

    The line to change starts with if ($br) $pee = ...

    The way to change it is to add a comment marker // at the beginning of the entire line.

    The effect this will have is that single newlines (returns) in your editing window such as those you use to wrap lines of text, will not be reflected in your published post, which will therefore contain automatically wrapping paragraphs. And this seemed to work for all existing posts in your database.

    At least this is how it seemed to work for me.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.