ZIm/crates/search
dinocosta 09470b9d57 fix: fix issue with conflicting pattern items
Fix issue where having conflicting pattern items in the search query
could lead to erroneous results. For example, if the search query was
`test\c\C\c`, one would expect for the case sensitivity option to be
disabled, seeing as `\c` is the last pattern item. However, since the
code was simply iterating over `PATTERN_ITEMS`, it did not take into
consideration that:

1. The same pattern item could appear more than once in the query 2. The
order of the pattern item in the query should take precedence over the
order of the pattern item in `PATTERN_ITEMS`

As such, this commit fixes that so that the implementation actually
iterates over the pattern items capture in the query, ensuring that, if
`\c\C\c` is found, the last pattern item is the one that will be
applied.
2025-08-26 16:28:57 +01:00
..
src fix: fix issue with conflicting pattern items 2025-08-26 16:28:57 +01:00
Cargo.toml refactor: use regex over fancy-regex in pattern-items implementation 2025-08-26 16:28:57 +01:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00