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'\]\([^\)]*\)'), '') // 只有圆括号部分