mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 09:35:12 +00:00
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:
parent
bc73a5da95
commit
f0cc00c04a
1 changed files with 11 additions and 14 deletions
|
@ -49,20 +49,17 @@ class HtmlMessage extends StatelessWidget {
|
||||||
final linkifiedRenderHtml = linkify(
|
final linkifiedRenderHtml = linkify(
|
||||||
renderHtml,
|
renderHtml,
|
||||||
options: const LinkifyOptions(humanize: false),
|
options: const LinkifyOptions(humanize: false),
|
||||||
)
|
).map(
|
||||||
.map(
|
(element) {
|
||||||
(element) {
|
if (element is! UrlElement ||
|
||||||
if (element is! UrlElement ||
|
element.text.contains('<') ||
|
||||||
element.text.contains('<') ||
|
element.text.contains('>') ||
|
||||||
element.text.contains('>') ||
|
element.text.contains('"')) {
|
||||||
element.text.contains('"')) {
|
return element.text;
|
||||||
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 a new issue