From 703ed00387b2f4e7296a35a169942f4bbdf51ead Mon Sep 17 00:00:00 2001 From: raeleus Date: Thu, 10 Oct 2024 22:33:51 -0700 Subject: [PATCH] Add a trailing quote if one is missing in a Say action. --- Library.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Library.js b/Library.js index 2c55ce0..9ef639d 100644 --- a/Library.js +++ b/Library.js @@ -82,6 +82,7 @@ function sanitizeText(text) { text = text.replace(/^\s*>\s/, "") text = text.replace(/says? "/, "") text = text.replace(/"\n$/, "") + if (text.split('"').length - 1 % 2 == 1) text += '"' } else if (/^\s*>\s.*/.test(text)) { text = text.replace(/^\s*>\s/, "") text = text.replace(/\.?\n$/, "")