mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-09 08:38:53 +01:00
Extending punctuation
Extending punctuation for thoughts.
This commit is contained in:
parent
6a832bdf2a
commit
d25ba41fb5
@ -477,7 +477,7 @@ export function sortByCssOrder(a, b) {
|
||||
* trimToEndSentence('Hello, world! I am from'); // 'Hello, world!'
|
||||
*/
|
||||
export function trimToEndSentence(input, include_newline = false) {
|
||||
const punctuation = new Set(['.', '!', '?', '*', '"', ')', '}', '`', ']', '$', '。', '!', '?', '”', ')', '】', '’', '」']); // extend this as you see fit
|
||||
const punctuation = new Set(['.', '!', '?', '*', '"', ')', '}', '`', ']', '$', '。', '!', '?', '”', ')', '】', '’', '」', '_']); // extend this as you see fit
|
||||
let last = -1;
|
||||
|
||||
for (let i = input.length - 1; i >= 0; i--) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user