support strong label in comments

This commit is contained in:
2025-01-23 16:42:31 +08:00
parent 5ef973cbfb
commit e555779419

View File

@@ -529,6 +529,7 @@ class _Tag {
'u' => style.underline, 'u' => style.underline,
's' => style.lineThrough, 's' => style.lineThrough,
'a' => style.withColor(context.colorScheme.primary), 'a' => style.withColor(context.colorScheme.primary),
'strong' => style.bold,
'span' => () { 'span' => () {
if (attributes.containsKey('style')) { if (attributes.containsKey('style')) {
var s = attributes['style']!; var s = attributes['style']!;
@@ -670,7 +671,7 @@ class _RichCommentContentState extends State<RichCommentContent> {
attributes[attrSplits[0]] = attrSplits[1].replaceAll('"', ''); 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)) { if (acceptedTags.contains(tagName)) {
writeBuffer(); writeBuffer();
if (tagName == 'img') { if (tagName == 'img') {