mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Formatting: Update autop()
to match wpautop()
.
[38592] changed the behaviour of `wpautop()` , so it's nice to change `autop()` to match. Interestingly, this change isn't necessary for the functionality to work - #4857 didn't affect content that had been run through `autop()` at some point, as `autop()` would add a single line break before block elements, then `wpautop()` would later add a second line break, making it work correctly. Props nacin for finding out about [38592] on Twitter, and DMing me to remind me to review `autop()`. See #4857. Built from https://develop.svn.wordpress.org/trunk@38594 git-svn-id: http://core.svn.wordpress.org/trunk@38537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e1d553e20a
commit
3e08cf2b66
@ -274,7 +274,7 @@
|
||||
|
||||
text = text + '\n\n';
|
||||
text = text.replace( /<br \/>\s*<br \/>/gi, '\n\n' );
|
||||
text = text.replace( new RegExp( '(<(?:' + blocklist + ')(?: [^>]*)?>)', 'gi' ), '\n$1' );
|
||||
text = text.replace( new RegExp( '(<(?:' + blocklist + ')(?: [^>]*)?>)', 'gi' ), '\n\n$1' );
|
||||
text = text.replace( new RegExp( '(</(?:' + blocklist + ')>)', 'gi' ), '$1\n\n' );
|
||||
text = text.replace( /<hr( [^>]*)?>/gi, '<hr$1>\n\n' ); // hr is self closing block element
|
||||
text = text.replace( /\s*<option/gi, '<option' ); // No <p> or <br> around <option>
|
||||
|
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
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38593';
|
||||
$wp_version = '4.7-alpha-38594';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user