Apply user-fixes.

This commit is contained in:
tastytea 2019-12-25 02:42:27 +01:00
parent 27ac10b821
commit e1a973f11f
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 11 additions and 1 deletions

View File

@ -133,7 +133,17 @@ void Document::parse_rss(const pt::ptree &tree)
}
Item item;
item.description = remove_html(rssitem.get<string>("description"));
item.description =
[&]
{
string desc =
remove_html(rssitem.get<string>("description"));
for (const auto &fix : _data.fixes)
{
desc = regex_replace(desc, regex{fix}, "");
}
return desc;
}();
item.guid = move(guid);
item.link = rssitem.get<string>("link");
item.title = move(title);