From e55577941939157bdd77e666f0e376454edf06fb Mon Sep 17 00:00:00 2001 From: nyne Date: Thu, 23 Jan 2025 16:42:31 +0800 Subject: [PATCH] support strong label in comments --- lib/pages/comments_page.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pages/comments_page.dart b/lib/pages/comments_page.dart index 4196a4d..ee8a091 100644 --- a/lib/pages/comments_page.dart +++ b/lib/pages/comments_page.dart @@ -529,6 +529,7 @@ class _Tag { 'u' => style.underline, 's' => style.lineThrough, 'a' => style.withColor(context.colorScheme.primary), + 'strong' => style.bold, 'span' => () { if (attributes.containsKey('style')) { var s = attributes['style']!; @@ -670,7 +671,7 @@ class _RichCommentContentState extends State { attributes[attrSplits[0]] = attrSplits[1].replaceAll('"', ''); } } - const acceptedTags = ['img', 'a', 'b', 'i', 'u', 's', 'br', 'span']; + const acceptedTags = ['img', 'a', 'b', 'i', 'u', 's', 'br', 'span', 'strong']; if (acceptedTags.contains(tagName)) { writeBuffer(); if (tagName == 'img') {