From 4694f8544c4cbd7e7d92323976b63cc77fdadb27 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 28 Apr 2021 20:02:14 +0200 Subject: Lazy load recommendations, simplify html parser --- src/plugins/Pleroma.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/plugins/Pleroma.cpp') diff --git a/src/plugins/Pleroma.cpp b/src/plugins/Pleroma.cpp index 20d71c7..f0bb808 100644 --- a/src/plugins/Pleroma.cpp +++ b/src/plugins/Pleroma.cpp @@ -61,10 +61,7 @@ namespace QuickMedia { std::string content(content_json.GetString(), content_json.GetStringLength()); HtmlParseUserdata parse_userdata; - HtmlParser html_parser; - html_parser_init(&html_parser, content.data(), content.size(), html_parse_callback, &parse_userdata); - html_parser_parse(&html_parser); - html_parser_deinit(&html_parser); + html_parser_parse(content.data(), content.size(), html_parse_callback, &parse_userdata); while(!parse_userdata.result.empty() && parse_userdata.result.back() == '\n') parse_userdata.result.pop_back(); -- cgit v1.2.3