mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
fix:dsl dictionary parse.
This commit is contained in:
parent
c9d053d227
commit
2a08b6290e
|
@ -1153,6 +1153,12 @@ void expandOptionalParts( wstring & str, list< wstring > * result,
|
|||
list< wstring > * headwords;
|
||||
headwords = inside_recurse ? result : &expanded;
|
||||
|
||||
//if str is too long ,it can never be headwords.
|
||||
//todo?
|
||||
if( str.size() > 100 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
for( ; x < str.size(); )
|
||||
{
|
||||
wchar ch = str[ x ];
|
||||
|
|
|
@ -622,6 +622,8 @@ wstring trimWhitespaceOrPunct( wstring const & in )
|
|||
|
||||
wstring trimWhitespace( wstring const & in )
|
||||
{
|
||||
if( in.empty() )
|
||||
return in;
|
||||
wchar const * wordBegin = in.c_str();
|
||||
wstring::size_type wordSize = in.size();
|
||||
|
||||
|
|
Loading…
Reference in a new issue