mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 13:05:11 +00:00
fix: Remove wrong rendered linebreak in html
This commit is contained in:
parent
3856745ce4
commit
e08445ee51
1 changed files with 14 additions and 11 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue