remove nothing

This commit is contained in:
tastytea 2018-04-20 11:45:31 +02:00
parent 3e2f81131c
commit b7616e3f44
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project (mastorss
VERSION 0.5.6
VERSION 0.5.7
LANGUAGES CXX
)

View File

@ -155,8 +155,9 @@ std::vector<string> parse_website(const string &xml)
str = std::regex_replace(str, recdata1, "");
str = std::regex_replace(str, recdata2, "");
str = std::regex_replace(str, restrip, "");
str = std::regex_replace(str, std::regex("[\\r\\n] +[\\r\\n]"), "\n\n"); // remove space between newlines
str = std::regex_replace(str, std::regex("[\\r\\n]{3,}"), "\n"); // remove excess newlines
str = std::regex_replace(str, std::regex("[\\r\\n] +[\\r\\n]"), "\n\n"); // remove space between newlines
str = std::regex_replace(str, std::regex("[\\r\\n]{3,}"), "\n"); // remove excess newlines
str = std::regex_replace(str, std::regex("^[ \t]*$"), ""); // remove nothing
for (const string &hashtag : watchwords)
{