mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
(fix: filter search) trim keyword pre processing
This commit is contained in:
@@ -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