fix : zim resource link

This commit is contained in:
Xiao YiFang 2022-11-24 07:16:18 +08:00
parent f3975837c4
commit c2607dbb31

4
zim.cc
View file

@ -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