From: Alan Date: Fri, 7 Jan 2022 07:10:58 +0000 (+0800) Subject: Roo/htmleditor/TidyWriter.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=5f0424cbea2a43a6200fcad26f7a173cf35c43c4 Roo/htmleditor/TidyWriter.js --- diff --git a/Roo/htmleditor/TidyWriter.js b/Roo/htmleditor/TidyWriter.js index e9f75d69d8..e2ccd4b0b0 100644 --- a/Roo/htmleditor/TidyWriter.js +++ b/Roo/htmleditor/TidyWriter.js @@ -78,7 +78,7 @@ Roo.htmleditor.TidyWriter.prototype = { i_inline = false; } - var indentstr = i_inline || this.in_pre ? '' : this.indentstr; + var indentstr = this.indentstr; // e_inline = elements that can be inline, but still allow \n before and after? // only 'BR' ??? any others? @@ -92,11 +92,17 @@ Roo.htmleditor.TidyWriter.prototype = { this.addLine(); } else if (this.lastElementEndsWS()) { this.addLine(); + } else{ + // otherwise - no new line. (and dont indent.) + + indentstr = ''; } - // otherwise - no new line. + } else { this.addLine(); } + } else { + indentstr = ''; } this.html.push(indentstr + '<', name.toLowerCase());