opt: reorder the action (#2018)
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run

This commit is contained in:
xiaoyifang 2024-12-13 10:44:54 +08:00 committed by GitHub
parent a5337770da
commit 6cd878fdcb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,8 +22,8 @@ std::u32string apply( std::u32string const & in, bool preserveWildcards )
{
// remove diacritics (normalization), white space, punt,
auto temp = QString::fromStdU32String( in )
.remove( RX::markSpace )
.normalized( QString::NormalizationForm_KD )
.remove( RX::markSpace )
.removeIf( [ preserveWildcards ]( const QChar & ch ) -> bool {
return ch.isPunct()
&& !( preserveWildcards && ( ch == '\\' || ch == '?' || ch == '*' || ch == '[' || ch == ']' ) );