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:
@@ -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
|
## 5.2.0
|
||||||
|
|
||||||
✅ Added
|
✅ Added
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ class StreamMessageText extends StatelessWidget {
|
|||||||
.translate(language)
|
.translate(language)
|
||||||
.replaceMentions()
|
.replaceMentions()
|
||||||
.text
|
.text
|
||||||
?.replaceAll('\n', '\n\n');
|
?.replaceAll('\n', '\n\n')
|
||||||
|
.trim();
|
||||||
final themeData = Theme.of(context);
|
final themeData = Theme.of(context);
|
||||||
return MarkdownBody(
|
return MarkdownBody(
|
||||||
data: messageText ?? '',
|
data: messageText ?? '',
|
||||||
|
|||||||
Reference in New Issue
Block a user