Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-html5-editor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2424d02
)
code cleanup
author
Jason Woofenden
<jason@jasonwoof.com>
Wed, 17 May 2017 05:28:44 +0000
(
01:28
-0400)
committer
Jason Woofenden
<jason@jasonwoof.com>
Wed, 17 May 2017 05:28:44 +0000
(
01:28
-0400)
editor.js
patch
|
blob
|
history
diff --git
a/editor.js
b/editor.js
index
e4ab024
..
92023d1
100644
(file)
--- a/
editor.js
+++ b/
editor.js
@@
-274,7
+274,7
@@
void_elements = {
}
// contents are not html encoded
}
// contents are not html encoded
-plaintext_elements = {
+var plaintext_elements = {
style: 1,
script: 1,
xmp: 1,
style: 1,
script: 1,
xmp: 1,
@@
-286,7
+286,7
@@
plaintext_elements = {
}
// parser deletes a starting newline inside:
}
// parser deletes a starting newline inside:
-newline_eating_elements = {
+var newline_eating_elements = {
pre: 1,
textarea: 1,
listing: 1
pre: 1,
textarea: 1,
listing: 1
@@
-2156,7
+2156,7
@@
PeachHTML5Editor.prototype.text_cleanup = function(n) {
}
if (need_preserve) {
// do we have it already?
}
if (need_preserve) {
// do we have it already?
- ws = this.computed_style(n, 'white-space') // FIXME implement this
+ ws = this.computed_style(n, 'white-space')
if (ws_props[ws] != null ? !ws_props[ws].space : true) {
// 2nd arg is ideal target for css rule
ws = this.preserve_space(n, block)
if (ws_props[ws] != null ? !ws_props[ws].space : true) {
// 2nd arg is ideal target for css rule
ws = this.preserve_space(n, block)
@@
-2164,7
+2164,7
@@
PeachHTML5Editor.prototype.text_cleanup = function(n) {
eats_start_sp = false
} else {
if (is_space_code(n.text.charCodeAt(n.text.length - 1))) {
eats_start_sp = false
} else {
if (is_space_code(n.text.charCodeAt(n.text.length - 1))) {
- ws = this.computed_style(n, 'white-space') // FIXME implement this
+ ws = this.computed_style(n, 'white-space')
if ((ref1 = ws_props[ws]) != null ? ref1.space : void 0) {
eats_start_sp = false
} else {
if ((ref1 = ws_props[ws]) != null ? ref1.space : void 0) {
eats_start_sp = false
} else {