Merge pull request #464 from Decodetalkers/fixcodecannotwrap

fix: code cannot be wrap
This commit is contained in:
Krille-chan 2023-07-22 08:58:22 +02:00 • committed by GitHub
commit 2e14e63172
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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