mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
DSL: Fix handling of dsl "@" subcard in first line of card
This commit is contained in:
parent
780eabac47
commit
2c5582ec33
9
dsl.cc
9
dsl.cc
|
@ -89,7 +89,7 @@ DEF_EX_STR( exDictzipError, "DICTZIP error", Dictionary::Ex )
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
Signature = 0x584c5344, // DSLX on little-endian, XLSD on big-endian
|
Signature = 0x584c5344, // DSLX on little-endian, XLSD on big-endian
|
||||||
CurrentFormatVersion = 22 + BtreeIndexing::FormatVersion + Folding::Version,
|
CurrentFormatVersion = 23 + BtreeIndexing::FormatVersion + Folding::Version,
|
||||||
CurrentZipSupportVersion = 2,
|
CurrentZipSupportVersion = 2,
|
||||||
CurrentFtsIndexVersion = 6
|
CurrentFtsIndexVersion = 6
|
||||||
};
|
};
|
||||||
|
@ -2323,12 +2323,15 @@ vector< sptr< Dictionary::Class > > makeDictionaries(
|
||||||
bool wasEmptyLine = false;
|
bool wasEmptyLine = false;
|
||||||
int headwordLine = scanner.getLinesRead() - 2;
|
int headwordLine = scanner.getLinesRead() - 2;
|
||||||
bool noSignificantLines = Folding::applyWhitespaceOnly( curString ).empty();
|
bool noSignificantLines = Folding::applyWhitespaceOnly( curString ).empty();
|
||||||
|
bool haveLine = !noSignificantLines;
|
||||||
|
|
||||||
// Skip the article's body
|
// Skip the article's body
|
||||||
for( ; ; )
|
for( ; ; )
|
||||||
{
|
{
|
||||||
if ( ! ( hasString = scanner.readNextLineWithoutComments( curString, curOffset ) )
|
hasString = haveLine ? true : scanner.readNextLineWithoutComments( curString, curOffset );
|
||||||
|| ( curString.size() && !isDslWs( curString[ 0 ] ) ) )
|
haveLine = false;
|
||||||
|
|
||||||
|
if ( !hasString || ( curString.size() && !isDslWs( curString[ 0 ] ) ) )
|
||||||
{
|
{
|
||||||
if( insideInsided )
|
if( insideInsided )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue