Fix getArticleCount.

With #403, the article mimetype may be different than "text/html".
It can also be "text/html; raw=true".
(And in fact it already could have any kind of optional argument).
This commit is contained in:
Matthieu Gautier 2020-08-11 17:43:31 +02:00
parent 87b5adcaf4
commit a55d504017
1 changed files with 4 additions and 3 deletions

View File

@ -138,9 +138,10 @@ unsigned int Reader::getArticleCount() const
if (counterMap.empty()) {
counter = this->nsACount;
} else {
auto it = counterMap.find("text/html");
if (it != counterMap.end()) {
counter = it->second;
for(auto &pair:counterMap) {
if (startsWith(pair.first, "text/html")) {
counter += pair.second;
}
}
}