From f2ffaf6f704e4e2721f65f8244e575af16dd2f98 Mon Sep 17 00:00:00 2001 From: "Ding, Shuo" Date: Mon, 18 Aug 2025 12:02:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=9A=84=E7=A7=BB=E9=99=A4ma?= =?UTF-8?q?rkdown=E4=B8=AD=E7=9A=84=E9=A2=9Durl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/common_util.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/utils/common_util.dart b/lib/utils/common_util.dart index ae5abc9..56b52a4 100644 --- a/lib/utils/common_util.dart +++ b/lib/utils/common_util.dart @@ -27,8 +27,7 @@ class CommonUtil { // 修正:使用 replaceAllMapped 避免 $1 问题 .replaceAllMapped(RegExp(r'^#{1,6}\s+(.*)$', multiLine: true), (m) => m.group(1) ?? '') - .replaceAllMapped(RegExp(r'\[([^\]]+)\]\([^\)]+\)'), (m) => m.group(1) ?? '') - + .replaceAll(RegExp(r'\[([^\]]+)\]\([^\)]+\)'), '') // 过滤掉完整超链接 // 修正:处理不完整的链接 .replaceAll(RegExp(r'\[([^\]]*)\](?!\()'), r'$1') // 只有方括号的链接 .replaceAll(RegExp(r'\]\([^\)]*\)'), '') // 只有圆括号部分