#ifndef NEWSBOAT_REGEXMANAGER_H_ #define NEWSBOAT_REGEXMANAGER_H_ #include #include #include #include #include #include #include #include #include "configactionhandler.h" #include "matcher.h" #include "regexowner.h" namespace newsboat { class RegexManager : public ConfigActionHandler { public: RegexManager(); void handle_action(const std::string& action, const std::vector& params) override; void dump_config(std::vector& config_output) const override; void quote_and_highlight(std::string& str, const std::string& location); void remove_last_regex(const std::string& location); int article_matches(Matchable* item); int feed_matches(Matchable* feed); std::map extract_style_tags(std::string& str); void insert_style_tags(std::string& str, std::map& tags); void merge_style_tag(std::map& tags, const std::string& tag, size_t start, size_t end); std::string get_attrs_stfl_string(const std::string& location, bool hasFocus); private: typedef std::vector, std::string>> RegexStyleVector; std::map locations; std::vector cheat_store_for_dump_config; std::vector, int>> matchers_article; std::vector, int>> matchers_feed; void handle_highlight_action(const std::vector& params); void handle_highlight_item_action(const std::string& action, const std::vector& params); }; } // namespace newsboat #endif /* NEWSBOAT_REGEXMANAGER_H_ */