From a184b9f23134840f5c3eb0aaf42f455e138de825 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 7 May 2018 23:09:21 +0200 Subject: [PATCH] introduced text limit of 2000 chars --- CMakeLists.txt | 2 +- src/parse.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea41774..bcb5321 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (mastorss - VERSION 0.5.14 + VERSION 0.5.15 LANGUAGES CXX ) diff --git a/src/parse.cpp b/src/parse.cpp index a7c27cb..7385b68 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -123,6 +123,12 @@ std::vector parse_website(const string &xml) if (!config[profile]["titles_only"].asBool()) { str += "\n\n" + desc; + + // Shrink overly long texts, to speed up replace operations + if (str.length() > 2000) + { + str.resize(2000); + } } bool skipthis = false;