fix gh issue #30

https://github.com/ajaxorg/ace/issues/#issue/30
This commit is contained in:
Fabian Jakobs 2011-01-10 23:26:29 +01:00
commit f89ed9a319

View file

@ -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/);
}; };