mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
opt: headword parse modification
This commit is contained in:
parent
2fff75aad9
commit
8e61aed9d5
|
@ -1684,7 +1684,7 @@ static void handleIdxSynFile( string const & fileName,
|
|||
|
||||
string headword( word, wordLen );
|
||||
|
||||
if ( strstr( headword, "&#" ) ) {
|
||||
if ( headword.find_first_of( "&#" ) != string::npos ) {
|
||||
// Decode some html-coded symbols in headword
|
||||
headword = Html::unescapeUtf8( headword );
|
||||
wordLen = headword.length();
|
||||
|
@ -1735,11 +1735,11 @@ static void handleIdxSynFile( string const & fileName,
|
|||
// synonyms which really start from slash and contain dollar signs, or
|
||||
// end with dollar and contain slashes.
|
||||
if ( headword.front() == '/' ) {
|
||||
if ( strchr( headword, '$' ) )
|
||||
if ( headword.find_first_of( '$' ) !=string::npos )
|
||||
continue; // Skip this entry
|
||||
}
|
||||
else if ( headword.end() == '$' ) {
|
||||
if ( strchr( headword, '/' ) )
|
||||
if ( headword.find_first_of( '/' ) != string::npos )
|
||||
continue; // Skip this entry
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue