make getNewLineCharacter errorproof

This commit is contained in:
nightwing 2012-11-19 19:26:56 +04:00
commit 40563347e9

View file

@ -140,16 +140,16 @@ var Document = function(text) {
* *
**/ **/
this.getNewLineCharacter = function() { this.getNewLineCharacter = function() {
switch (this.$newLineMode) { switch (this.$newLineMode) {
case "windows": case "windows":
return "\r\n"; return "\r\n";
case "unix": case "unix":
return "\n"; return "\n";
case "auto": default:
return this.$autoNewLine; return this.$autoNewLine;
} }
}; };
this.$autoNewLine = "\n"; this.$autoNewLine = "\n";