Better newline reduction (hopefully)

This commit is contained in:
tastytea 2018-02-28 20:46:56 +01:00
parent 54fdf2c154
commit a140a6b5b3
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project (mastorss
VERSION 0.3.2
VERSION 0.3.4
LANGUAGES CXX
)

View File

@ -147,8 +147,8 @@ std::vector<string> parse_website(const string &profile, const string &xml)
str = std::regex_replace(str, reindyfuckup, "");
str = std::regex_replace(str, redaclosing, "");
str = std::regex_replace(str, reggboclosing, "");
str = std::regex_replace(str, std::regex("\\n \\n]"), "\n\n"); // remove space between newlines
str = std::regex_replace(str, std::regex("[\\n\\r ]{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
for (const string &hashtag : watchwords)
{