Make WordPress Core

Ticket #37066: 37066.patch

File 37066.patch, 514 bytes (added by rellect, 7 years ago)
  • wp-admin/js/editor.js

     
    222222                        html = html.replace( /\n[\s\u00a0]+\n/g, '\n\n' );
    223223
    224224                        // Rrplace <br> tags with a line break.
    225                         html = html.replace( /\s*<br ?\/?>\s*/gi, '\n' );
     225                        html = html.replace( /\s*?(\n)?\s*<br ?\/?>\s*/gi, '$1\n' );
    226226
    227227                        // Fix line breaks around <div>.
    228228                        html = html.replace( /\s*<div/g, '\n<div' );