remove trailing newlines in description
This commit is contained in:
parent
a621d29b9e
commit
3e2f81131c
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required (VERSION 3.7)
|
||||
project (mastorss
|
||||
VERSION 0.5.5
|
||||
VERSION 0.5.6
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
|
|
@ -173,6 +173,12 @@ std::vector<string> parse_website(const string &xml)
|
|||
str.resize(str.rfind(' ')); // Cut at word boundary
|
||||
str += " […]";
|
||||
}
|
||||
// Remove trailing newlines
|
||||
while (str.back() == '\n' ||
|
||||
str.back() == '\r')
|
||||
{
|
||||
str.resize(str.length() - 1);
|
||||
}
|
||||
str += "\n\n" + link + "\n\n#bot";
|
||||
ret.push_back(str);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user