mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Remove "include newlines" checkbox from context formatting settings
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user