From: Alan Date: Fri, 7 Jan 2022 06:46:21 +0000 (+0800) Subject: Roo/htmleditor/TidyWriter.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=fcc5e3bdb42b8b25bc8b5b1b847a9b1ce5b855a2 Roo/htmleditor/TidyWriter.js --- diff --git a/Roo/htmleditor/TidyWriter.js b/Roo/htmleditor/TidyWriter.js index 41052673d3..d09f094f09 100644 --- a/Roo/htmleditor/TidyWriter.js +++ b/Roo/htmleditor/TidyWriter.js @@ -171,9 +171,12 @@ Roo.htmleditor.TidyWriter.prototype = { this.html[this.html.length] = text; return; } - // see if last line is a line break + // see if last element was a inline element. var indentstr = this.indentstr; - if (node.previousSibling && node.previousSibling.nodeType == 1 && Roo.htmleditor.TidyWriter.inline_elements.indexOf(node.previousSibling.nodeName) > -1) { + if (node.previousSibling && + node.previousSibling.nodeType == 1 && + Roo.htmleditor.TidyWriter.inline_elements.indexOf(node.previousSibling.nodeName) > -1) + { indentstr = ''; } else { this.addLine();