Merge branch 'develop' into main
continuous-integration/drone/push Build is passing Details

This commit is contained in:
tastytea 2019-12-15 14:52:28 +01:00
commit f9101a3aa1
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 8 additions and 8 deletions

View File

@ -106,7 +106,7 @@ void Export::AsciiDoc::print() const
if (!entry.description.empty())
{
_out << " +" << endl << entry.description;
_out << " +\n+" << entry.description << '+';
}
_out << endl << endl;
}

View File

@ -688,6 +688,11 @@ string URI::to_utf8(const string &str)
detect_encoding();
}
if (_encoding == "utf-8")
{
return str;
}
return boost::locale::conv::to_utf<char>(str, _encoding);
}
@ -698,19 +703,14 @@ void URI::detect_encoding()
re_encoding.split(_document, matches);
if (matches.size() >= 2)
{
_encoding = matches[1];
_encoding = boost::locale::to_lower(matches[1]);
}
}
bool URI::is_html() const
{
const RegEx re_htmlfile(".*\\.(.?html?|xml|rss)$", RegEx::RE_CASELESS);
if (_uri.substr(0, 4) == "http" || re_htmlfile.match(_uri))
{
return true;
}
return false;
return (_uri.substr(0, 4) == "http" || re_htmlfile.match(_uri));
}
} // namespace remwharead