From 5e7c214c89fccae87d68c05a73ea867ddbf7d05f Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 6 May 2024 22:02:13 +0300 Subject: [PATCH] Substitute macros in text to classify --- public/scripts/extensions/expressions/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts/extensions/expressions/index.js b/public/scripts/extensions/expressions/index.js index 321cfc4a9..263947d30 100644 --- a/public/scripts/extensions/expressions/index.js +++ b/public/scripts/extensions/expressions/index.js @@ -972,8 +972,8 @@ function sampleClassifyText(text) { return text; } - // Remove asterisks and quotes - let result = text.replace(/[*"]/g, ''); + // Replace macros, remove asterisks and quotes + let result = substituteParams(text).replace(/[*"]/g, ''); const SAMPLE_THRESHOLD = 500; const HALF_SAMPLE_THRESHOLD = SAMPLE_THRESHOLD / 2;