Changeset 35999
- Timestamp:
- 12/17/2015 11:05:09 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/editor.js
r35727 r35999 119 119 // Replace paragraphs with double line breaks 120 120 function removep( html ) { 121 var blocklist = 'blockquote|ul|ol|li| table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset',121 var blocklist = 'blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset', 122 122 blocklist1 = blocklist + '|div|p', 123 123 blocklist2 = blocklist + '|pre', … … 171 171 html = html.replace( new RegExp('\\s*<((?:' + blocklist2 + ')(?: [^>]*)?)\\s*>', 'g' ), '\n<$1>' ); 172 172 html = html.replace( new RegExp('\\s*</(' + blocklist2 + ')>\\s*', 'g' ), '</$1>\n' ); 173 html = html.replace( /< li([^>]*)>/g, '\t<li$1>' );173 html = html.replace( /<((li|dt|dd)[^>]*)>/g, ' \t<$1>' ); 174 174 175 175 if ( html.indexOf( '<option' ) !== -1 ) {
Note: See TracChangeset
for help on using the changeset viewer.