parent
7b07851c8f
commit
f89ed9a319
1 changed files with 9 additions and 3 deletions
|
|
@ -70,6 +70,12 @@ var Document = function(text, mode) {
|
||||||
|
|
||||||
this.$undoManager = null;
|
this.$undoManager = null;
|
||||||
|
|
||||||
|
// check for IE split bug
|
||||||
|
if ("aaa".split(/a/).length == 0)
|
||||||
|
this.$split = function(text) {
|
||||||
|
return text.replace(/\r\n|\r/g, "\n").split("\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
this.$split = function(text) {
|
this.$split = function(text) {
|
||||||
return text.split(/\r\n|\r|\n/);
|
return text.split(/\r\n|\r|\n/);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue