Skip to content

Commit 9e74506

Browse files
author
Andika Demas Riyandi
committed
fixing suffix style search to make exact match in the first list
1 parent e6edd8e commit 9e74506

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src-ui.v3/src/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ bodyElement4 = do
156156
| JSS.isInfixOf "^" sJ = filter (JSS.isPrefixOf (JSS.dropWhile (=='^') sJ)) p
157157
| JSS.isInfixOf "$" sJ = filter (JSS.isSuffixOf (JSS.dropWhileEnd (=='$') sJ)) p
158158
| otherwise = filter (JSS.isInfixOf sJ) p
159-
exactMatches pkgs' sJss = List.partition (==sJss) pkgs'
159+
exactMatches pkgs' sJss = List.partition (==(JSS.dropWhileEnd (=='$') sJss)) pkgs'
160160
matchesE = calcMatches <$> current dynPackagesJss <@> (JSS.textToJSString <$> searchInputE)
161161
dynMatches <- holdDyn [] matchesE
162162
dynSearch <- holdDyn "" (JSS.textToJSString <$> searchInputE)

0 commit comments

Comments
 (0)