replace NO-BREAK SPACE with space
This commit is contained in:
parent
393d1df378
commit
ede97e65fe
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.7)
|
cmake_minimum_required (VERSION 3.7)
|
||||||
project (mastorss
|
project (mastorss
|
||||||
VERSION 0.5.10
|
VERSION 0.5.11
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -155,9 +155,10 @@ std::vector<string> parse_website(const string &xml)
|
||||||
str = std::regex_replace(str, recdata1, "");
|
str = std::regex_replace(str, recdata1, "");
|
||||||
str = std::regex_replace(str, recdata2, "");
|
str = std::regex_replace(str, recdata2, "");
|
||||||
str = std::regex_replace(str, restrip, "");
|
str = std::regex_replace(str, restrip, "");
|
||||||
str = std::regex_replace(str, std::regex("\\r"), ""); // remove \r
|
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("\uc2a0"), " "); // replace NO-BREAK SPACE with space
|
||||||
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 whitespace between newlines
|
||||||
|
str = std::regex_replace(str, std::regex("\\n{3,}"), "\n\n"); // remove excess newlines
|
||||||
|
|
||||||
for (const string &hashtag : watchwords)
|
for (const string &hashtag : watchwords)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user