Fixed the post-size calculation
This commit is contained in:
parent
136cea0a5d
commit
a2858ec62b
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required (VERSION 3.7)
|
||||
project (mastorss
|
||||
VERSION 0.6.0
|
||||
VERSION 0.6.1
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
|
|
@ -148,7 +148,9 @@ std::vector<string> parse_website(const string &xml)
|
|||
str = std::regex_replace(str, std::regex("##"), "#");
|
||||
if ((str.size() + link.size()) > static_cast<std::uint16_t>(max_size - 15))
|
||||
{
|
||||
str.resize((max_size - link.size() - 15));
|
||||
str.resize((max_size - link.size() -
|
||||
config[profile]["append"].asString().length()
|
||||
- 4));
|
||||
str.resize(str.rfind(' ')); // Cut at word boundary
|
||||
str += " […]";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user