aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-03-17 01:22:49 +0100
committerdec05eba <dec05eba@protonmail.com>2021-03-17 01:22:49 +0100
commite0ba22f713415316a07edc818e443c0d8cb892f7 (patch)
tree92a7457dd2ad468b797927cf1a8dfb04ca3e40c2
parent257cb6d783ab96f77f187ead1b6032cd4b660a0e (diff)
Matrix: fix block formatting when using multiple blocks
-rw-r--r--src/plugins/Matrix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 1a70a54..aa6de40 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -2599,7 +2599,7 @@ namespace QuickMedia {
if(backquote_start_index != std::string::npos) {
size_t backquote_end_index = find_backquote_index_with_escape(line_str, backquote_start_index + 1);
if(backquote_end_index != std::string::npos) {
- formatted_body += line_str.substr(0, backquote_start_index);
+ formatted_body += line_str.substr(index, backquote_start_index - index);
formatted_body += "<code>";
formatted_body += line_str.substr(backquote_start_index + 1, backquote_end_index - (backquote_start_index + 1));
formatted_body += "</code>";