diff options
Diffstat (limited to 'src/bridge')
-rw-r--r-- | src/bridge/colors.cpp | 7 | ||||
-rw-r--r-- | src/bridge/colors.hpp | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/bridge/colors.cpp b/src/bridge/colors.cpp index 6f6d7a9..3aed07c 100644 --- a/src/bridge/colors.cpp +++ b/src/bridge/colors.cpp @@ -77,6 +77,13 @@ Xmpp::body irc_format_to_xhtmlim(const std::string& s) if (s[pos_end] == IRC_FORMAT_BOLD_CHAR) styles.strong = !styles.strong; + else if (s[pos_end] == IRC_FORMAT_NEWLINE_CHAR) + { + XmlNode* br_node = new XmlNode("br"); + br_node->close(); + current_node->add_child(br_node); + cleaned += '\n'; + } else if (s[pos_end] == IRC_FORMAT_UNDERLINE_CHAR) styles.underline = !styles.underline; else if (s[pos_end] == IRC_FORMAT_ITALIC_CHAR) diff --git a/src/bridge/colors.hpp b/src/bridge/colors.hpp index 82e6faf..b5e6e7b 100644 --- a/src/bridge/colors.hpp +++ b/src/bridge/colors.hpp @@ -28,6 +28,7 @@ namespace Xmpp #define IRC_FORMAT_REVERSE2_CHAR '\x16' // wat #define IRC_FORMAT_ITALIC_CHAR '\x1D' // done #define IRC_FORMAT_UNDERLINE_CHAR '\x1F' // done +#define IRC_FORMAT_NEWLINE_CHAR '\n' // done static const char irc_format_char[] = { IRC_FORMAT_BOLD_CHAR, @@ -38,6 +39,7 @@ static const char irc_format_char[] = { IRC_FORMAT_REVERSE2_CHAR, IRC_FORMAT_ITALIC_CHAR, IRC_FORMAT_UNDERLINE_CHAR, + IRC_FORMAT_NEWLINE_CHAR, '\x00' }; |