mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-19 03:54:07 +00:00
opt: reorder the action (#2018)
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run
This commit is contained in:
parent
a5337770da
commit
6cd878fdcb
|
@ -22,8 +22,8 @@ std::u32string apply( std::u32string const & in, bool preserveWildcards )
|
||||||
{
|
{
|
||||||
// remove diacritics (normalization), white space, punt,
|
// remove diacritics (normalization), white space, punt,
|
||||||
auto temp = QString::fromStdU32String( in )
|
auto temp = QString::fromStdU32String( in )
|
||||||
.remove( RX::markSpace )
|
|
||||||
.normalized( QString::NormalizationForm_KD )
|
.normalized( QString::NormalizationForm_KD )
|
||||||
|
.remove( RX::markSpace )
|
||||||
.removeIf( [ preserveWildcards ]( const QChar & ch ) -> bool {
|
.removeIf( [ preserveWildcards ]( const QChar & ch ) -> bool {
|
||||||
return ch.isPunct()
|
return ch.isPunct()
|
||||||
&& !( preserveWildcards && ( ch == '\\' || ch == '?' || ch == '*' || ch == '[' || ch == ']' ) );
|
&& !( preserveWildcards && ( ch == '\\' || ch == '?' || ch == '*' || ch == '[' || ch == ']' ) );
|
||||||
|
|
Loading…
Reference in a new issue