diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-09-28 13:32:34 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-09-28 13:32:34 +0200 |
commit | 4277763df5c1dac8ff389d3bfd138f03acc7f1e2 (patch) | |
tree | b0c3fc77ea601f105308d42840adb1ce2050b414 /src/plugins/Matrix.cpp | |
parent | a16cfdc4f6cd14d576760c100a817c08f45be394 (diff) |
Implement text editing with navigation and multilingual fonts
Diffstat (limited to 'src/plugins/Matrix.cpp')
-rw-r--r-- | src/plugins/Matrix.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index d364b16..513a9fb 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -666,7 +666,10 @@ namespace QuickMedia { std::string formatted_body; bool contains_formatted_text = false; if(msgtype == MessageType::TEXT) { - string_split(body, '\n', [&formatted_body, &contains_formatted_text](const char *str, size_t size){ + int line = 0; + string_split(body, '\n', [&formatted_body, &contains_formatted_text, &line](const char *str, size_t size){ + if(line > 0) + formatted_body += "<br/>"; if(size > 0 && str[0] == '>') { std::string line(str, size); html_escape_sequences(line); @@ -677,6 +680,7 @@ namespace QuickMedia { } else { formatted_body.append(str, size); } + ++line; return true; }); } |