From 5a387e3e0b3a1fc048ef3428c7f21541ac759d08 Mon Sep 17 00:00:00 2001 From: Bruno FS Date: Fri, 28 Apr 2023 13:41:53 -0300 Subject: [PATCH] clarified a comment --- public/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index fb6052da4..ff2170ff4 100644 --- a/public/script.js +++ b/public/script.js @@ -2256,7 +2256,9 @@ function cleanUpMessage(getMessage, isImpersonate) { } getMessage = $.trim(getMessage); - // remove trailing invisible whitespace from lines + // trailing invisible whitespace before every newlines, on a multiline string + // "trailing whitespace on newlines \nevery line of the string \n?sample text" -> + // "trailing whitespace on newlines\nevery line of the string\nsample text" getMessage = getMessage.replace(/\s+$/gm, ""); if (is_pygmalion) { getMessage = getMessage.replace(//g, name1);