remove \t

This commit is contained in:
Raven Scott 2023-05-05 19:08:13 +02:00 committed by MrTuxedo
parent 5516e4c20b
commit 637c5182a3

View File

@ -214,7 +214,7 @@ async function generateResponse(conversation, message) {
}
if (pageContent) {
const MAX_CONTENT_LENGTH = process.env.MAX_CONTENT_LENGTH;
let plainTextContent = $('<div>').html(pageContent).text().trim().replace(/[\r\n]+/g, ' ');
let plainTextContent = $('<div>').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);