From 5a05c319107c54eac529a732e5d963469677e3c5 Mon Sep 17 00:00:00 2001 From: sherlock Date: Tue, 23 Jan 2024 10:58:41 +0700 Subject: [PATCH] hot-fix: back to fluffychat code --- lib/src/room.dart | 2 +- lib/src/utils/markdown.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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();