Roo/htmleditor/TidyWriter.js
[roojs1] / Roo / htmleditor / TidyWriter.js
index 3fe22f8..2654f20 100644 (file)
@@ -139,13 +139,15 @@ Roo.htmleditor.TidyWriter.prototype = {
     end: function(name) {
         var value;
         this.popState();
-        var indentstr = ''; 
-        if (!this.in_pre && !this.in_inline) {
+        var indentstr = '';
+        var in_inline = this.in_inline || Roo.htmleditor.TidyWriter.inline_elements.indexOf(name) > -1;
+        
+        if (!this.in_pre && !in_inline) {
             this.addLine();
             indentstr  = this.indentstr;
         }
         this.html.push(indentstr + '</', name.toLowerCase(), '>');
-       
+        this.last_inline = in_inline;
         
         // pop the indent state..
     },