fix: Remove wrong rendered linebreak in html

This commit is contained in:
Krille 2023-05-31 10:19:13 +02:00
parent 44d7f61788
commit 715dca561f
No known key found for this signature in database

View File

@ -49,17 +49,20 @@ class HtmlMessage extends StatelessWidget {
final linkifiedRenderHtml = linkify(
renderHtml,
options: const LinkifyOptions(humanize: false),
).map(
(element) {
if (element is! UrlElement ||
element.text.contains('<') ||
element.text.contains('>') ||
element.text.contains('"')) {
return element.text;
}
return '<a href="${element.url}">${element.text}</a>';
},
).join('');
)
.map(
(element) {
if (element is! UrlElement ||
element.text.contains('<') ||
element.text.contains('>') ||
element.text.contains('"')) {
return element.text;
}
return '<a href="${element.url}">${element.text}</a>';
},
)
.join('')
.replaceAll('\n', '');
final linkColor = textColor.withAlpha(150);