Formatting: Add correct `<p>` tags near `<hr>` tags.

It can be tricky to know when `wpautop()` should add `<p>` tags, but one thing we can be certain about is that they really shouldn't be anywhere near `<hr>` tags.

Now they aren't.

Props solarissmoke, MattyRob, pento.
Fixes #14674.


Built from https://develop.svn.wordpress.org/trunk@45574


git-svn-id: http://core.svn.wordpress.org/trunk@45385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2019-06-28 07:16:56 +00:00
parent dd38e9cc0b
commit 691ffce019
2 changed files with 4 additions and 1 deletions

View File

@ -500,6 +500,9 @@ function wpautop( $pee, $br = true ) {
// Add a double line break below block-level closing tags.
$pee = preg_replace( '!(</' . $allblocks . '>)!', "$1\n\n", $pee );
// Add a double line break after hr tags, which are self closing.
$pee = preg_replace( '!(<hr\s*?/?>)!', "$1\n\n", $pee );
// Standardize newline characters to "\n".
$pee = str_replace( array( "\r\n", "\r" ), "\n", $pee );

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45573';
$wp_version = '5.3-alpha-45574';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.