projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fbfcae6
)
Roo/htmleditor/TidyWriter.js
author
Alan
<alan@roojs.com>
Fri, 7 Jan 2022 07:10:58 +0000
(15:10 +0800)
committer
Alan
<alan@roojs.com>
Fri, 7 Jan 2022 07:10:58 +0000
(15:10 +0800)
Roo/htmleditor/TidyWriter.js
patch
|
blob
|
history
diff --git
a/Roo/htmleditor/TidyWriter.js
b/Roo/htmleditor/TidyWriter.js
index
e9f75d6
..
e2ccd4b
100644
(file)
--- a/
Roo/htmleditor/TidyWriter.js
+++ b/
Roo/htmleditor/TidyWriter.js
@@
-78,7
+78,7
@@
Roo.htmleditor.TidyWriter.prototype = {
i_inline = false;
}
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?
// 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();
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 {
this.addLine();
}
+ } else {
+ indentstr = '';
}
this.html.push(indentstr + '<', name.toLowerCase());
}
this.html.push(indentstr + '<', name.toLowerCase());