diff --git a/CMakeLists.txt b/CMakeLists.txt index e9eb29b..afb0159 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (mastorss - VERSION 0.5.7 + VERSION 0.5.8 LANGUAGES CXX ) diff --git a/src/parse.cpp b/src/parse.cpp index b4b3a41..519ff12 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -155,9 +155,10 @@ 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\\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 + 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 for (const string &hashtag : watchwords) {