From 7068120d2ccc0cf2d1475b310c56a1843af5055a Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Fri, 19 Dec 2025 17:17:23 +0800 Subject: [PATCH] =?UTF-8?q?content=E8=BD=AC=E6=88=90latex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Production.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/application/api/controller/Production.php b/application/api/controller/Production.php index 85e3b0f..f584f23 100644 --- a/application/api/controller/Production.php +++ b/application/api/controller/Production.php @@ -2053,7 +2053,7 @@ class Production extends Base //整理引用信息的内容 // $updatedContent = $this->convertReferencesToLatex($article_main_info['content'], $refArray); //替换其他标签 - $updatedContent = $this->convertToLatex($updatedContent,$refArray); + $updatedContent = $this->convertToLatex($article_main_info['content'],$refArray); //做内容替换 $article_main_info['content'] = $updatedContent; $fragContentList[] = $article_main_info; @@ -2095,6 +2095,8 @@ class Production extends Base ->where('state', 0) ->order('index ASC') ->select(); + + $refArray = []; foreach ($references as $ref) { $refArray[$ref['index'] + 1] = $ref; @@ -2112,7 +2114,10 @@ class Production extends Base if (empty(trim($content))) { return ''; } + $content = str_replace("–","-",$content); + $content = $this->convertReferencesToLatex($content, $refArray); + // 步骤1:忽略并移除