mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-19 11:22:35 +01:00
fix: Remove wrong rendered linebreak in html
This commit is contained in:
parent
44d7f61788
commit
715dca561f
@ -49,17 +49,20 @@ class HtmlMessage extends StatelessWidget {
|
|||||||
final linkifiedRenderHtml = linkify(
|
final linkifiedRenderHtml = linkify(
|
||||||
renderHtml,
|
renderHtml,
|
||||||
options: const LinkifyOptions(humanize: false),
|
options: const LinkifyOptions(humanize: false),
|
||||||
).map(
|
)
|
||||||
(element) {
|
.map(
|
||||||
if (element is! UrlElement ||
|
(element) {
|
||||||
element.text.contains('<') ||
|
if (element is! UrlElement ||
|
||||||
element.text.contains('>') ||
|
element.text.contains('<') ||
|
||||||
element.text.contains('"')) {
|
element.text.contains('>') ||
|
||||||
return element.text;
|
element.text.contains('"')) {
|
||||||
}
|
return element.text;
|
||||||
return '<a href="${element.url}">${element.text}</a>';
|
}
|
||||||
},
|
return '<a href="${element.url}">${element.text}</a>';
|
||||||
).join('');
|
},
|
||||||
|
)
|
||||||
|
.join('')
|
||||||
|
.replaceAll('\n', '');
|
||||||
|
|
||||||
final linkColor = textColor.withAlpha(150);
|
final linkColor = textColor.withAlpha(150);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user