diff --git a/index.html b/index.html
index b2cd74f..8f822f2 100644
--- a/index.html
+++ b/index.html
@@ -241,13 +241,13 @@ function searchDocuments() {
}
const matches = documents.filter(doc => {
- const titleWords = normalize(doc.title)
- .split(/[\s\-_]+/);
+ const title = normalize(doc.title);
+ const id = normalize(doc.id);
- const id = normalize(doc.id);
+ const titleWords = title.match(/[\p{L}\p{N}]+/gu) || [];
- return titleWords.includes(query) || id === query;
- });
+ return titleWords.includes(query) || id === query;
+});
status.textContent =
`${matches.length} نتیجه پیدا شد.`;