Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Text/Fuzzy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ match pattern t pre post extract caseSensitive =
let cur' = cur * 2 + 1 in
(tot + cur', cur', res <> pre <> T.singleton c <> post, xs)
else (tot, 0, res <> T.singleton c, pat)
) (0, 0, mempty, pattern') s'
) ( 0
, 1 -- reward prefix matching
, mempty
, pattern') s'

-- | The function to filter a list of values by fuzzy search on the text extracted from them.
--
Expand Down