projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4661ff9
)
Roo/htmleditor/TidyWriter.js
author
Alan
<alan@roojs.com>
Fri, 7 Jan 2022 06:45:53 +0000
(14:45 +0800)
committer
Alan
<alan@roojs.com>
Fri, 7 Jan 2022 06:45:53 +0000
(14:45 +0800)
Roo/htmleditor/TidyWriter.js
patch
|
blob
|
history
diff --git
a/Roo/htmleditor/TidyWriter.js
b/Roo/htmleditor/TidyWriter.js
index
f7c91ee
..
4105267
100644
(file)
--- a/
Roo/htmleditor/TidyWriter.js
+++ b/
Roo/htmleditor/TidyWriter.js
@@
-169,12
+169,15
@@
Roo.htmleditor.TidyWriter.prototype = {
}
if (this.in_pre || this.in_inline) {
this.html[this.html.length] = text;
}
if (this.in_pre || this.in_inline) {
this.html[this.html.length] = text;
- return;
-
+ return;
}
// see if last line is a line break
}
// see if last line is a line break
-
- this.addLine();
+ var indentstr = this.indentstr;
+ if (node.previousSibling && node.previousSibling.nodeType == 1 && Roo.htmleditor.TidyWriter.inline_elements.indexOf(node.previousSibling.nodeName) > -1) {
+ indentstr = '';
+ } else {
+ this.addLine();
+ }
@@
-186,7
+189,7
@@
Roo.htmleditor.TidyWriter.prototype = {
return;
}
if (!text.match(/\n/)) {
return;
}
if (!text.match(/\n/)) {
- this.html.push(
this.
indentstr + text);
+ this.html.push(indentstr + text);
return;
}
return;
}