Merge pull request #1428 from GetStream/hotfix/white-box-with-whitespaces

fix: Trim whitespaces of a message before rendering it
This commit is contained in:
Rafal Adasiewicz
2023-01-12 12:24:19 +01:00
committed by GitHub
2 changed files with 7 additions and 1 deletions
@@ -1,3 +1,8 @@
## Upcoming
🐞 Fixed
- [[#1424]](https://github.com/GetStream/stream-chat-flutter/issues/1424) Fixed a render issue when showing messages starting with 4 whitespaces.
## 5.2.0
✅ Added
@@ -40,7 +40,8 @@ class StreamMessageText extends StatelessWidget {
.translate(language)
.replaceMentions()
.text
?.replaceAll('\n', '\n\n');
?.replaceAll('\n', '\n\n')
.trim();
final themeData = Theme.of(context);
return MarkdownBody(
data: messageText ?? '',