make getNewLineCharacter errorproof
This commit is contained in:
parent
27dd31cf62
commit
40563347e9
1 changed files with 6 additions and 6 deletions
|
|
@ -140,16 +140,16 @@ var Document = function(text) {
|
|||
*
|
||||
**/
|
||||
this.getNewLineCharacter = function() {
|
||||
switch (this.$newLineMode) {
|
||||
switch (this.$newLineMode) {
|
||||
case "windows":
|
||||
return "\r\n";
|
||||
return "\r\n";
|
||||
|
||||
case "unix":
|
||||
return "\n";
|
||||
return "\n";
|
||||
|
||||
case "auto":
|
||||
return this.$autoNewLine;
|
||||
}
|
||||
default:
|
||||
return this.$autoNewLine;
|
||||
}
|
||||
};
|
||||
|
||||
this.$autoNewLine = "\n";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue