fix: code cannot be wrap

I think it is a wrong fix for link, '\n' should not be replaceAll,
so I think this should be reverted
This commit is contained in:
ShootingStarDragons 2023-07-22 11:50:46 +08:00
parent bc73a5da95
commit f0cc00c04a

View file

@ -49,20 +49,17 @@ 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('')
.replaceAll('\n', '');
).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('');
final linkColor = textColor.withAlpha(150);