Changeset 9255
- Timestamp:
- 10/20/2008 07:25:02 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r9189 r9255 127 127 } 128 128 $pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates 129 $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end 129 // make paragraphs, including one at the end 130 $pees = preg_split('/\n\s*\n/', $pee, -1, PREG_SPLIT_NO_EMPTY); 131 $pee = ''; 132 foreach ( $pees as $tinkle ) 133 $pee .= '<p>' . trim($tinkle, "\n") . "</p>\n"; 130 134 $pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace 131 135 $pee = preg_replace('!<p>([^<]+)\s*?(</(?:div|address|form)[^>]*>)!', "<p>$1</p>$2", $pee);
Note: See TracChangeset
for help on using the changeset viewer.