File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -676,7 +676,7 @@ class Room {
676
676
getMention: getMention);
677
677
// if the decoded html is the same as the body, there is no need in sending a formatted message
678
678
if (HtmlUnescape ().convert (html.replaceAll (RegExp (r'<br />\n?' ), '\n ' )) !=
679
- event['body' ]) {
679
+ event['body' ]. toString (). convertLinebreaksToBr () ) {
680
680
event['format' ] = 'org.matrix.custom.html' ;
681
681
event['formatted_body' ] = html;
682
682
}
Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ String markdown(
263
263
return ret;
264
264
}
265
265
266
- extension on String {
266
+ extension StringExtension on String {
267
267
String convertLinebreaksToBr () {
268
268
final parts = split ('pre>' );
269
269
var convertLinebreaks = true ;
You can’t perform that action at this time.
0 commit comments