feat: 投票类回复移除冗余编号显示

This commit is contained in:
orz12
2024-07-11 17:51:35 +08:00
parent 39b5e369f8
commit db5d680e2f

View File

@@ -532,7 +532,7 @@ InlineSpan buildContent(
// 投票 // 投票
if (content.vote.isNotEmpty) { if (content.vote.isNotEmpty) {
content.message.splitMapJoin(RegExp(r"\{vote:.*?\}"), content.message.splitMapJoin(RegExp(r"\{vote:\d+?\}"),
onMatch: (Match match) { onMatch: (Match match) {
// String matchStr = match[0]!; // String matchStr = match[0]!;
spanChildren.add( spanChildren.add(
@@ -556,8 +556,8 @@ InlineSpan buildContent(
}, onNonMatch: (String str) { }, onNonMatch: (String str) {
return str; return str;
}); });
content.message = content.message.replaceAll(RegExp(r"\{vote:\d+?\}"), "");
} }
// content.message = content.message.replaceAll(RegExp(r"\{vote:.*?\}"), ' ');
content.message = content.message content.message = content.message
.replaceAll('&', '&') .replaceAll('&', '&')
.replaceAll('&lt;', '<') .replaceAll('&lt;', '<')