mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
fix:fix epwing dictionary link display incorrectly
this bug was introduced by the commit 46b4151cc4
This commit is contained in:
parent
a1ef0313ab
commit
e06f865048
|
@ -13,9 +13,6 @@
|
||||||
#include "wstring_qt.hh"
|
#include "wstring_qt.hh"
|
||||||
#include "folding.hh"
|
#include "folding.hh"
|
||||||
#include "epwing_charmap.hh"
|
#include "epwing_charmap.hh"
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
|
|
||||||
#include <QtCore5Compat>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined( Q_OS_WIN32 ) || defined( Q_OS_MAC )
|
#if defined( Q_OS_WIN32 ) || defined( Q_OS_MAC )
|
||||||
#define _FILE_OFFSET_BITS 64
|
#define _FILE_OFFSET_BITS 64
|
||||||
|
@ -1207,8 +1204,8 @@ void EpwingBook::finalizeText( QString & text )
|
||||||
// Replace references
|
// Replace references
|
||||||
|
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
QRegularExpression reg1( "<R[^<]*>" );
|
QRegularExpression reg1( "<R[^<]*>", QRegularExpression::CaseInsensitiveOption );
|
||||||
QRegularExpression reg2( "</R[^<]*>" );
|
QRegularExpression reg2( "</R[^<]*>", QRegularExpression::CaseInsensitiveOption );
|
||||||
|
|
||||||
EContainer cont( this, true );
|
EContainer cont( this, true );
|
||||||
|
|
||||||
|
@ -1751,8 +1748,7 @@ QByteArray EpwingBook::handleReference( EB_Hook_Code code, const unsigned int *
|
||||||
refPages.append( argv[ 1 ] );
|
refPages.append( argv[ 1 ] );
|
||||||
refOffsets.append( argv[ 2 ] );
|
refOffsets.append( argv[ 2 ] );
|
||||||
|
|
||||||
QString str;
|
QString str = QString( "</R%1>" ).arg( refCloseCount );
|
||||||
str.asprintf( "</R%i>", refCloseCount );
|
|
||||||
refCloseCount += 1;
|
refCloseCount += 1;
|
||||||
|
|
||||||
return str.toUtf8();
|
return str.toUtf8();
|
||||||
|
|
Loading…
Reference in a new issue