mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
feat: cjk regex match
This commit is contained in:
parent
3e05e711e5
commit
c3abe99162
|
@ -44,6 +44,12 @@ static QString makeHiliteRegExpString( QStringList const & words,
|
|||
QString searchString( "(" );
|
||||
|
||||
QString stripWords( "(?:\\W+\\w+){0," );
|
||||
|
||||
if( hasCJK )
|
||||
{
|
||||
stripWords = "(?:[\\W\\w]){0,";
|
||||
}
|
||||
|
||||
if( distanceBetweenWords >= 0 )
|
||||
stripWords += QString::number( distanceBetweenWords );
|
||||
stripWords += "}";
|
||||
|
|
Loading…
Reference in a new issue