1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-20 02:39:53 +08:00
Files
osu-lazer/osu.Game.Tests/NonVisual
T
Simão Caixas f3c9dd7f3b Fix song select search not matching results when punctuation marks surround the searched double-quoted phrase (#37034)
Fixes #36645

The IsolatedPhrase match mode in FilterCriteria used \s (whitespace) as
word boundaries, meaning a search term had to be surrounded by spaces
(or start/end of string) to match.

This caused songs with titles like
'Music Theme "Some Artist"' to not appear when searching for "Some
Artist", since the phrase was bounded by quote characters rather than
spaces.

This change extends the boundary pattern to also accept Unicode
punctuation (\p{P}) alongside whitespace, so terms surrounded by quotes,
commas are correctly matched as isolated phrases.

Tests have been added to cover searching for terms adjacent to
punctuation boundaries
(TestCriteriaMatchingTermsAdjacentToPunctuation).

Tests cover the example mentioned above.
Code inspector with no errors and tests passing.
f3c9dd7f3b · 2026-03-23 08:12:46 +01:00
History
..
2026-03-17 03:58:02 +09:00
2026-03-17 03:58:02 +09:00
2023-06-24 01:00:03 +09:00
2023-06-24 01:00:03 +09:00
2024-02-02 21:36:41 +09:00