From b7616e3f44162c0109fc00ee5aa8d7e2511ef001 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 20 Apr 2018 11:45:31 +0200 Subject: [PATCH] remove nothing --- CMakeLists.txt | 2 +- src/parse.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e699a05..e9eb29b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (mastorss - VERSION 0.5.6 + VERSION 0.5.7 LANGUAGES CXX ) diff --git a/src/parse.cpp b/src/parse.cpp index 3ba60fe..b4b3a41 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -155,8 +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\\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) {