From db5d680e2fbb91d9c693f3282018aa14965fa423 Mon Sep 17 00:00:00 2001 From: orz12 Date: Thu, 11 Jul 2024 17:51:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8A=95=E7=A5=A8=E7=B1=BB=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99=E7=BC=96=E5=8F=B7?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/video/detail/reply/widgets/reply_item.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart index be16e0d88..760317501 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item.dart @@ -532,7 +532,7 @@ InlineSpan buildContent( // 投票 if (content.vote.isNotEmpty) { - content.message.splitMapJoin(RegExp(r"\{vote:.*?\}"), + content.message.splitMapJoin(RegExp(r"\{vote:\d+?\}"), onMatch: (Match match) { // String matchStr = match[0]!; spanChildren.add( @@ -556,8 +556,8 @@ InlineSpan buildContent( }, onNonMatch: (String str) { return str; }); + content.message = content.message.replaceAll(RegExp(r"\{vote:\d+?\}"), ""); } - // content.message = content.message.replaceAll(RegExp(r"\{vote:.*?\}"), ' '); content.message = content.message .replaceAll('&', '&') .replaceAll('<', '<')