From ca40a244d7c83bb05461be7792abc55bd620d8db Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Tue, 14 Nov 2017 05:23:55 +0000 Subject: [PATCH] Editor: Cease adding paragraphs when switching editor tabs. Fixes an error since [41783] in which extra paragraphs could be added to content when switching editor tabs. Props pento, adamsilverstein, aduth. Fixes #42531. git-svn-id: https://develop.svn.wordpress.org/trunk@42177 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/editor.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/wp-admin/js/editor.js b/src/wp-admin/js/editor.js index 342560e2a6..a5ab98dff3 100644 --- a/src/wp-admin/js/editor.js +++ b/src/wp-admin/js/editor.js @@ -1037,10 +1037,6 @@ window.wp = window.wp || {}; // Normalize line breaks. text = text.replace( /\r\n|\r/g, '\n' ); - if ( text.indexOf( '\n' ) === -1 ) { - return text; - } - // Remove line breaks from . if ( text.indexOf( '/g, function( a ) {