Merge pull request #5424 from pangeachat/5405-if-link-treat-as-regular-message

chore: If link, treat as regular message
This commit is contained in:
ggurdin 2026-01-26 13:42:59 -05:00 committed by GitHub
commit 2871c4618f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -174,8 +174,9 @@ class HtmlMessage extends StatelessWidget {
);
String _addTokenTags() {
final regex = RegExp(r'(<[^>]+>)');
if (html.contains("<a href")) return html;
final regex = RegExp(r'(<[^>]+>)');
final matches = regex.allMatches(html);
final List<String> result = <String>[];
int lastEnd = 0;
@ -209,6 +210,8 @@ class HtmlMessage extends StatelessWidget {
}
}
debugPrint("Results: $result");
int position = 0;
final tokenPositions = tokens != null
? TokensUtil.getAdjacentTokenPositions(event.eventId, tokens!)