diff --git a/lib/src/room.dart b/lib/src/room.dart index fd2f86a3a..14d39f857 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -675,7 +675,7 @@ class Room { getEmotePacks: () => getImagePacksFlat(ImagePackUsage.emoticon), getMention: getMention); // if the decoded html is the same as the body, there is no need in sending a formatted message - if (HtmlUnescape().convert(html.replaceAll(RegExp(r'
\n?'), '\n')) != + if (HtmlUnescape().convert(html.replaceAll(RegExp(r'
\n?'), '\n')) != event['body']) { event['format'] = 'org.matrix.custom.html'; event['formatted_body'] = html; diff --git a/lib/src/utils/markdown.dart b/lib/src/utils/markdown.dart index fd8129422..93a37eaca 100644 --- a/lib/src/utils/markdown.dart +++ b/lib/src/utils/markdown.dart @@ -256,7 +256,7 @@ String markdown( ret = ret .trim() // Remove trailing linebreaks - .replaceAll(RegExp(r'(
)+$'), ''); + .replaceAll(RegExp(r'(
)+$'), ''); if (convertLinebreaks) { // Only convert linebreaks which are not in
 blocks
     ret = ret.convertLinebreaksToBr();