Skip to content

Commit

Permalink
Merge pull request #1439 from dhalbert/search-ignore-hyphens
Browse files Browse the repository at this point in the history
match hyphenated or unhyphenated search terms
  • Loading branch information
makermelissa authored Jul 23, 2024
2 parents 1d58cab + b90a982 commit 6316c28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/javascript/downloads.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ function shouldDisplayDownload(download, displayedManufacturers, displayedMcufam


for (const term of downloadsSearch.searchTerm.toLowerCase().split(" ")) {
if (!downloadData.includes(term)) {
if (!
(downloadData.includes(term) ||
downloadData.includes(term.replaceAll("-", "")))) {
return false;
}
}
Expand Down

0 comments on commit 6316c28

Please sign in to comment.