From c2607dbb319ca63eb1e1b3170a2e93d7801d3171 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Thu, 24 Nov 2022 07:16:18 +0800 Subject: [PATCH] fix : zim resource link --- zim.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zim.cc b/zim.cc index 1b1c94f4..8fdbadad 100644 --- a/zim.cc +++ b/zim.cc @@ -1520,8 +1520,8 @@ void ZimResourceRequest::run() sptr< Dictionary::DataRequest > ZimDictionary::getResource( string const & name ) { -// auto formatedName = QString::fromStdString(name).replace(RX::Zim::linkSpecialChar,""); - return new ZimResourceRequest( *this, name ); + auto formatedName = QString::fromStdString(name).remove(QRegularExpression("^\\.*\\/[A-Z]\\/", QRegularExpression::CaseInsensitiveOption)); + return new ZimResourceRequest( *this, formatedName.toStdString() ); } //} // anonymous namespace