Remove "include newlines" checkbox from context formatting settings

This commit is contained in:
Cohee
2024-09-22 19:55:43 +03:00
parent 93bf87b035
commit a18dae8f69
32 changed files with 19 additions and 74 deletions

View File

@ -607,12 +607,11 @@ export function sortByCssOrder(a, b) {
/**
* Trims a string to the end of a nearest sentence.
* @param {string} input The string to trim.
* @param {boolean} include_newline Whether to include a newline character in the trimmed string.
* @returns {string} The trimmed string.
* @example
* trimToEndSentence('Hello, world! I am from'); // 'Hello, world!'
*/
export function trimToEndSentence(input, include_newline = false) {
export function trimToEndSentence(input) {
if (!input) {
return '';
}
@ -633,11 +632,6 @@ export function trimToEndSentence(input, include_newline = false) {
}
break;
}
if (include_newline && char === '\n') {
last = i;
break;
}
}
if (last === -1) {