From 1204ba43d816a2799e7d7748c18dc49f7a5e8b78 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Mon, 15 May 2023 18:56:17 +0300 Subject: [PATCH] Extend punctuation list --- public/scripts/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/utils.js b/public/scripts/utils.js index 5c8c1eb89..dc84a357d 100644 --- a/public/scripts/utils.js +++ b/public/scripts/utils.js @@ -193,7 +193,7 @@ export function sortByCssOrder(a, b) { export function end_trim_to_sentence(input, include_newline = false) { // inspired from https://github.com/kaihordewebui/kaihordewebui.github.io/blob/06b95e6b7720eb85177fbaf1a7f52955d7cdbc02/index.html#L4853-L4867 - 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--) {