Changeset 40787
- Timestamp:
- 05/18/2017 10:55:00 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/editor.js
r40599 r40787 225 225 html = html.replace( /\n[\s\u00a0]+\n/g, '\n\n' ); 226 226 227 // Rrplace <br> tags with a line break. 228 html = html.replace( /\s*<br ?\/?>\s*/gi, '\n' ); 227 // Replace <br> tags with line breaks. 228 html = html.replace( /(\s*)<br ?\/?>\s*/gi, function( match, space ) { 229 if ( space && space.indexOf( '\n' ) !== -1 ) { 230 return '\n\n'; 231 } 232 233 return '\n'; 234 }); 229 235 230 236 // Fix line breaks around <div>.
Note: See TracChangeset
for help on using the changeset viewer.