diff --git a/src/App.tsx b/src/App.tsx index 380d3db..8db8a64 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -347,7 +347,7 @@ function sanitizeSubject(value: string): string { } function extractIdentitySubject(normalizedQuery: string): string { - const match = normalizedQuery.match(/\b(?:who\s+(?:is|was)|tell me about)\s+([a-z][a-z\s'-]{1,40})$/i) + const match = normalizedQuery.match(/\b(?:who\s+(?:is|was)|tell me about)\s+([a-z][a-z\s'-]{1,40})\b/i) if (!match) return '' const cleaned = sanitizeSubject(match[1]) const withoutArticles = cleaned.replace(/^(a|an|the)\s+/, '').trim()