From 637c5182a3b7ea9d56f4a558665a08e541638888 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Fri, 5 May 2023 19:08:13 +0200 Subject: [PATCH] remove \t --- llamabot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llamabot.js b/llamabot.js index f0f2854..d5618a6 100644 --- a/llamabot.js +++ b/llamabot.js @@ -214,7 +214,7 @@ async function generateResponse(conversation, message) { } if (pageContent) { const MAX_CONTENT_LENGTH = process.env.MAX_CONTENT_LENGTH; - let plainTextContent = $('
').html(pageContent).text().trim().replace(/[\r\n]+/g, ' '); + let plainTextContent = $('
').html(pageContent).text().trim().replace(/[\r\n\t]+/g, ' '); const codePattern = /\/\/|\/\*|\*\/|\{|\}|\[|\]|\bfunction\b|\bclass\b|\b0x[0-9A-Fa-f]+\b|\b0b[01]+\b/; const isCode = codePattern.test(plainTextContent);