MCPcopy
hub / github.com/ajaxorg/ace / getNewLineCharacter

Method getNewLineCharacter

src/document.js:85–94  ·  view source on GitHub ↗

* Returns the newline character that's being used, depending on the value of `newLineMode`. * @returns {String} If `newLineMode == windows`, `\r\n` is returned. * If `newLineMode == unix`, `\n` is returned. * If `newLineMode == auto`, the value of `autoNewLine` is returned.

()

Source from the content-addressed store, hash-verified

83 *
84 **/
85 getNewLineCharacter() {
86 switch (this.$newLineMode) {
87 case "windows":
88 return "\r\n";
89 case "unix":
90 return "\n";
91 default:
92 return this.$autoNewLine || "\n";
93 }
94 }
95
96 /**
97 * [Sets the new line mode.]{: #Document.setNewLineMode.desc}

Callers 14

getValueMethod · 0.95
getTextRangeMethod · 0.95
indexToPositionMethod · 0.95
positionToIndexMethod · 0.95
getCopyTextMethod · 0.80
multi_select.jsFile · 0.80
getPrecedingCharacterMethod · 0.80
$updateEolCharMethod · 0.80
getCopyTextMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected