From: Alan Date: Fri, 7 Jan 2022 06:55:10 +0000 (+0800) Subject: Roo/htmleditor/TidyWriter.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=8b120bbd99bd09b13f7c49335f43e98710748e14 Roo/htmleditor/TidyWriter.js --- diff --git a/Roo/htmleditor/TidyWriter.js b/Roo/htmleditor/TidyWriter.js index 5541b93cc3..239b87e1a8 100644 --- a/Roo/htmleditor/TidyWriter.js +++ b/Roo/htmleditor/TidyWriter.js @@ -75,8 +75,12 @@ Roo.htmleditor.TidyWriter.prototype = { var indentstr = in_inline || this.in_pre ? '' : this.indentstr; + // e_inline = elements that can be inline, but still allow \n before and after? + // only 'BR' ??? any others? + var e_inline = name == 'BR' ? false : this.in_inline; + // if this element is inline - then don't add stuff beforehand.. - if (!in_inline && !this.in_pre) { + if (!e_inline && !this.in_pre) { this.addLine(); }