Improved excess newline removal

This commit is contained in:
tastytea 2018-02-22 18:11:48 +01:00
parent 8991c656c2
commit 7ba7b800ab
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
1 changed files with 2 additions and 1 deletions

View File

@ -147,7 +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\\r ]{3,}"), "\n"); // remove excess newlines
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
for (const string &hashtag : watchwords)
{