mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
Formatting: make the removal of white space around <option> greedy, see #28217.
Built from https://develop.svn.wordpress.org/trunk@29316 git-svn-id: http://core.svn.wordpress.org/trunk@29097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ad0f539621
commit
004da2f6ba
@ -249,8 +249,8 @@ window.switchEditors = {
|
|||||||
pee = pee.replace( new RegExp( '(<(?:' + blocklist + ')(?: [^>]*)?>)', 'gi' ), '\n$1' );
|
pee = pee.replace( new RegExp( '(<(?:' + blocklist + ')(?: [^>]*)?>)', 'gi' ), '\n$1' );
|
||||||
pee = pee.replace( new RegExp( '(</(?:' + blocklist + ')>)', 'gi' ), '$1\n\n' );
|
pee = pee.replace( new RegExp( '(</(?:' + blocklist + ')>)', 'gi' ), '$1\n\n' );
|
||||||
pee = pee.replace( /<hr( [^>]*)?>/gi, '<hr$1>\n\n' ); // hr is self closing block element
|
pee = pee.replace( /<hr( [^>]*)?>/gi, '<hr$1>\n\n' ); // hr is self closing block element
|
||||||
pee = pee.replace( /\s<option/gi, '<option' ); // No <p> or <br> around <option>
|
pee = pee.replace( /\s*<option/gi, '<option' ); // No <p> or <br> around <option>
|
||||||
pee = pee.replace( /<\/option>\s/gi, '</option>' );
|
pee = pee.replace( /<\/option>\s*/gi, '</option>' );
|
||||||
pee = pee.replace( /\r\n|\r/g, '\n' );
|
pee = pee.replace( /\r\n|\r/g, '\n' );
|
||||||
pee = pee.replace( /\n\s*\n+/g, '\n\n' );
|
pee = pee.replace( /\n\s*\n+/g, '\n\n' );
|
||||||
pee = pee.replace( /([\s\S]+?)\n\n/g, '<p>$1</p>\n' );
|
pee = pee.replace( /([\s\S]+?)\n\n/g, '<p>$1</p>\n' );
|
||||||
|
2
wp-admin/js/editor.min.js
vendored
2
wp-admin/js/editor.min.js
vendored
File diff suppressed because one or more lines are too long
@ -394,8 +394,8 @@ function wpautop($pee, $br = true) {
|
|||||||
|
|
||||||
if ( strpos( $pee, '<option' ) !== false ) {
|
if ( strpos( $pee, '<option' ) !== false ) {
|
||||||
// no P/BR around option
|
// no P/BR around option
|
||||||
$pee = preg_replace( '|\s<option|', '<option', $pee );
|
$pee = preg_replace( '|\s*<option|', '<option', $pee );
|
||||||
$pee = preg_replace( '|</option>\s|', '</option>', $pee );
|
$pee = preg_replace( '|</option>\s*|', '</option>', $pee );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( strpos( $pee, '</object>' ) !== false ) {
|
if ( strpos( $pee, '</object>' ) !== false ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user