From 393d1df3785f42cbd4973f4f66424ed8e446b294 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 25 Apr 2018 16:37:11 +0200 Subject: [PATCH] Add unicode char c2a0 to list of whitespace to remove --- CMakeLists.txt | 2 +- src/parse.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bf9248..398b22a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (mastorss - VERSION 0.5.9 + VERSION 0.5.10 LANGUAGES CXX ) diff --git a/src/parse.cpp b/src/parse.cpp index 0dc8d59..b2e1819 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -155,9 +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[ \t]+\\n"), ""); // remove whitespace between newlines - str = std::regex_replace(str, std::regex("\\n{3,}"), "\n\n"); // remove excess newlines + str = std::regex_replace(str, std::regex("\\r"), ""); // remove \r + str = std::regex_replace(str, std::regex("\\n[ \uc2a0\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) {