From 61df4cdff1224e7f9ef231ec16e2b23b7abc5efa Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 22 Apr 2018 14:00:52 +0200 Subject: [PATCH] refix --- src/parse.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/parse.cpp b/src/parse.cpp index b6b09b6..0dc8d59 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -155,10 +155,9 @@ std::vector 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"), ""); // remove \r - str = std::regex_replace(str, std::regex("\\n +\\n"), "\n\n"); // remove space between newlines - str = std::regex_replace(str, std::regex("\\n{3,}"), "\n\n"); // remove excess newlines - str = std::regex_replace(str, std::regex("\\n[ \t]+\\n"), ""); // remove nothing + str = std::regex_replace(str, std::regex("\\r"), ""); // remove \r + str = std::regex_replace(str, std::regex("\\n[ \t]+\\n"), ""); // remove whitespace between newlines + str = std::regex_replace(str, std::regex("\\n{3,}"), "\n\n"); // remove excess newlines for (const string &hashtag : watchwords) {