mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 18:15:02 +00:00
(fix: filter search) trim keyword pre processing
This commit is contained in:
1 parent
17a176ad4e
commit
7c3f80f13d
1 file changed
+1
-1
@@ -35,7 +35,7 @@ export const preprocessSearchResultsToHTML = (text: string, keyword: string) =>
|
||||
const filteredResults = document.createElement("div");
|
||||
filteredResults.innerHTML = htmlString;
|
||||
|
||||
if (!processNode(filteredResults, keyword)) return null;
|
||||
if (!processNode(filteredResults, keyword.trim())) return null;
|
||||
|
||||
return filteredResults.innerHTML.trim() ? filteredResults.outerHTML : null;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user