diff --git a/CMakeLists.txt b/CMakeLists.txt index b2e4e58..4c6b58f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.7) include(GNUInstallDirs) project (mastorss - VERSION 0.2.3 + VERSION 0.2.4 LANGUAGES CXX ) diff --git a/README.md b/README.md index 922d3cf..ee8f3b1 100644 --- a/README.md +++ b/README.md @@ -50,11 +50,7 @@ The profile can't be named "global". | 0 | No error | | 1 | Invalid call | | 2 | Not implemented | -| 16 | Connection failed | -| 17 | TLS error | -| 18 | Invalid response from server | -| 32 | Wrong number of arguments | -| 33 | File not found | +| 10 | Wrong number of arguments | | 100 - 999 | HTTP status codes | | 65535 | Unknown exception | diff --git a/src/mastorss.cpp b/src/mastorss.cpp index fdcd93a..43218b2 100644 --- a/src/mastorss.cpp +++ b/src/mastorss.cpp @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) if (argc < 2) { cerr << "usage: " << argv[0] << " [max size]\n"; - return 32; + return 10; } if (argc == 3) diff --git a/src/parse.cpp b/src/parse.cpp index e37dc5d..a2ee52d 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -99,12 +99,12 @@ std::vector parse_website(const string &profile, const string &xml) str = std::regex_replace(str, relt, "<"); str = std::regex_replace(str, regt, ">"); + str = std::regex_replace(str, std::regex("[\\n\\r]+"), "\n"); // remove excess newlines str = std::regex_replace(str, reparagraph, "\n\n"); str = std::regex_replace(str, recdata1, ""); str = std::regex_replace(str, recdata2, ""); str = std::regex_replace(str, restrip, ""); str = std::regex_replace(str, reindyfuckup, ""); - str = std::regex_replace(str, std::regex("[\\n\\r]+"), "\n"); // remove excess newlines for (const string &hashtag : watchwords) {