Index: src/wp-admin/js/editor.js
===================================================================
--- src/wp-admin/js/editor.js (revision 40147)
+++ src/wp-admin/js/editor.js (working copy)
@@ -221,9 +221,15 @@
// Normalize white space chars and remove multiple line breaks.
html = html.replace( /\n[\s\u00a0]+\n/g, '\n\n' );
- // Rrplace
tags with a line break.
- html = html.replace( /\s*
\s*/gi, '\n' );
+ // Rrplace
tags with line breaks.
+ html = html.replace( /(\s*)
\s*/gi, function( match, space ) {
+ if ( space && space.indexOf( '\n' ) !== -1 ) {
+ return '\n\n';
+ }
+ return '\n';
+ });
+
// Fix line breaks around