Made sure the description isn't interrupted mid-word
This commit is contained in:
parent
56691fbdaa
commit
a81a200e9f
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.7)
|
cmake_minimum_required (VERSION 3.7)
|
||||||
project (mastorss
|
project (mastorss
|
||||||
VERSION 0.3.0
|
VERSION 0.3.1
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -152,6 +152,7 @@ std::vector<string> parse_website(const string &profile, const string &xml)
|
||||||
if ((str.size() + link.size()) > (std::uint16_t)(max_size - 15))
|
if ((str.size() + link.size()) > (std::uint16_t)(max_size - 15))
|
||||||
{
|
{
|
||||||
str.resize((max_size - link.size() - 15));
|
str.resize((max_size - link.size() - 15));
|
||||||
|
str.resize(str.rfind(' '));
|
||||||
str += " […]";
|
str += " […]";
|
||||||
}
|
}
|
||||||
str += "\n\n" + link + "\n\n#bot";
|
str += "\n\n" + link + "\n\n#bot";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user