From 2ad118bb5e94184bdb46b9040ce695ac6cf9a9ea Mon Sep 17 00:00:00 2001 From: "DESKTOP-64JNFCF\\keyra" Date: Thu, 19 Oct 2023 12:06:40 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=82=E3=81=84=E3=81=BE=E3=81=84=E6=A4=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/component/chat-palette/chat-palette.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/component/chat-palette/chat-palette.component.ts b/src/app/component/chat-palette/chat-palette.component.ts index 037dff7c..1d0b6eec 100644 --- a/src/app/component/chat-palette/chat-palette.component.ts +++ b/src/app/component/chat-palette/chat-palette.component.ts @@ -197,7 +197,11 @@ export class ChatPaletteComponent implements OnInit, OnDestroy { filter(value: string): boolean { if (this.filterText == null || this.filterText.trim() == '') return true; - return StringUtil.toHalfWidth(value.replace(/[―ー—‐]/g, '-')).replace(/[\r\n\s]+/, ' ').toUpperCase().trim().indexOf(StringUtil.toHalfWidth(this.filterText.replace(/[―ー—‐]/g, '-')).replace(/[\r\n\s]+/, ' ').toUpperCase().trim()) >= 0; + const nomarizeFilterText = StringUtil.toHalfWidth(this.filterText.replace(/[―ー—‐]/g, '-')).replace(/[\r\n\s]+/, ' ').toUpperCase().trim(); + const nomarizeValue = StringUtil.toHalfWidth(value.replace(/[―ー—‐]/g, '-')).replace(/[\r\n\s]+/, ' ').toUpperCase().trim(); + if (nomarizeValue.indexOf(nomarizeFilterText) >= 0) return true; + const nomarizeEvaluateValue = StringUtil.toHalfWidth(this.palette.evaluate(value, this.character.rootDataElement).replace(/[―ー—‐]/g, '-')).replace(/[\r\n\s]+/, ' ').toUpperCase().trim(); + return nomarizeEvaluateValue.indexOf(nomarizeFilterText) >= 0; } helpChatPallet() {