projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ee7c11
)
Roo/htmleditor/TidyWriter.js
author
Alan
<alan@roojs.com>
Fri, 7 Jan 2022 07:23:40 +0000
(15:23 +0800)
committer
Alan
<alan@roojs.com>
Fri, 7 Jan 2022 07:23:40 +0000
(15:23 +0800)
Roo/htmleditor/TidyWriter.js
patch
|
blob
|
history
diff --git
a/Roo/htmleditor/TidyWriter.js
b/Roo/htmleditor/TidyWriter.js
index
93c4829
..
4d23dcd
100644
(file)
--- a/
Roo/htmleditor/TidyWriter.js
+++ b/
Roo/htmleditor/TidyWriter.js
@@
-227,6
+227,14
@@
Roo.htmleditor.TidyWriter.prototype = {
{
text = this.indentstr + text.replace(/^\s+/g,'');
}
+ // repace long lines
+ text = this.indentstr + text.replace(
+ /(?![^\n]{1,64}$)([^\n]{1,64})\s/g, '$1\n' + this.indentstr
+ );
+ // remoeve the last whitespace / line break.
+ text = text.replace(/\s+$/,'');
+
+
}
this.html[this.html.length] = text;