mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +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 searchString( "(" );
|
||||||
|
|
||||||
QString stripWords( "(?:\\W+\\w+){0," );
|
QString stripWords( "(?:\\W+\\w+){0," );
|
||||||
|
|
||||||
|
if( hasCJK )
|
||||||
|
{
|
||||||
|
stripWords = "(?:[\\W\\w]){0,";
|
||||||
|
}
|
||||||
|
|
||||||
if( distanceBetweenWords >= 0 )
|
if( distanceBetweenWords >= 0 )
|
||||||
stripWords += QString::number( distanceBetweenWords );
|
stripWords += QString::number( distanceBetweenWords );
|
||||||
stripWords += "}";
|
stripWords += "}";
|
||||||
|
|
Loading…
Reference in a new issue