chore: Follow up html tag rendering

This commit is contained in:
Christian Kußowski 2025-12-02 09:20:32 +01:00
parent 3b181291cc
commit 86a73f9909
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -86,10 +86,10 @@ class HtmlMessage extends StatelessWidget {
'rt', 'rt',
'html', 'html',
'body', 'body',
// Workaround for https://github.com/krille-chan/fluffychat/issues/507
'tg-forward',
}; };
static const Set<String> ignoredHtmlTags = {'mx-reply'};
/// We add line breaks before these tags: /// We add line breaks before these tags:
static const Set<String> blockHtmlTags = { static const Set<String> blockHtmlTags = {
'p', 'p',
@ -170,6 +170,8 @@ class HtmlMessage extends StatelessWidget {
); );
} }
if (ignoredHtmlTags.contains(node.localName)) return const TextSpan();
switch (node.localName) { switch (node.localName) {
case 'br': case 'br':
return const TextSpan(text: '\n'); return const TextSpan(text: '\n');