From 8025d1075db0779bde635148f6e38303eb29d6c8 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 6 Nov 2022 13:54:02 +0100 Subject: Formatted text with color in matrix, monospace for codeblocks --- plugins/Matrix.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp index 11989e3..61814ac 100644 --- a/plugins/Matrix.hpp +++ b/plugins/Matrix.hpp @@ -24,6 +24,7 @@ namespace QuickMedia { std::string message_get_body_remove_formatting(Message *message); std::string extract_first_line_remove_newline_elipses(const std::string &str, size_t max_length); mgl::Color user_id_to_color(const std::string &user_id); + std::string formatted_text_to_qm_text(const char *str, size_t size); struct TimestampedDisplayData { std::string data; @@ -617,6 +618,7 @@ namespace QuickMedia { void update_room_users(RoomData *room); void append_system_message(RoomData *room_data, std::shared_ptr message); + std::string body_to_formatted_body(RoomData *room, const std::string &body); // Calls the |MatrixDelegate| pending events. // Should be called from the main (ui) thread @@ -627,7 +629,6 @@ namespace QuickMedia { void formatted_body_add_line(RoomData *room, std::string &formatted_body, const std::string &line_str); void replace_mentions(RoomData *room, std::string &text); - std::string body_to_formatted_body(RoomData *room, const std::string &body); std::string create_formatted_body_for_message_reply(RoomData *room, const Message *message, const std::string &body); PluginResult set_pinned_events(RoomData *room, const std::vector &pinned_events, bool is_add); -- cgit v1.2.3