diff --git a/application/api/controller/Production.php b/application/api/controller/Production.php index a94eba8..a59d948 100644 --- a/application/api/controller/Production.php +++ b/application/api/controller/Production.php @@ -2387,11 +2387,12 @@ class Production extends Base //这里处理引用 - if ($check_refer&&preg_match('/(?:)?\[(\d+(?:[-,]\d+)*)\](?:<\/blue>)?/', $tagWrappedContent, $matches)) { + if ($check_refer&&preg_match('/(?:)?\[\s*(\d+(?:\s*[-,]\s*\d+)*)\s*\](?:<\/blue>)?/', $tagWrappedContent, $matches)) { // 去除匹配中的 $cleanedMatch = str_replace(['', ''], '', $matches[0]); // 提取引用编号部分(去掉方括号) $referencePart = trim($cleanedMatch, '[]'); + $referencePart = preg_replace('/\s+/', '', $referencePart); // 移除所有空格 // 分割逗号分隔的不同引用项 $parts = explode(',', $referencePart);