From 78c085414576e278dea332556e04bbabe4537b9a Mon Sep 17 00:00:00 2001 From: Jeffery Date: Tue, 12 May 2026 02:10:47 +0000 Subject: [PATCH] fix: use includes matching for exclusions location and suggestion --- app/findings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/findings.js b/app/findings.js index cb65dbd..118b9e4 100644 --- a/app/findings.js +++ b/app/findings.js @@ -124,8 +124,8 @@ export function applyExclusions(findings, exclusions) { const before = findings.length; const filtered = findings.filter(f => !exclusions.some(ex => (!ex.role || ex.role === f.role) && - (!ex.location || ex.location === f.location) && - (!ex.suggestion || String(f.suggestion).startsWith(String(ex.suggestion).slice(0, 50))) + (!ex.location || String(f.location).includes(ex.location)) && + (!ex.suggestion || String(f.suggestion).includes(String(ex.suggestion).slice(0, 20))) )); console.log(` 排除過濾: ${before} -> ${filtered.length} 筆(排除 ${before - filtered.length} 筆)`); return filtered;