From bd0a23b052dc750db72d2b98349044a56ede2419 Mon Sep 17 00:00:00 2001 From: BigCoke233 Date: Sat, 30 May 2020 14:30:38 +0800 Subject: =?UTF-8?q?=E2=9C=A8=20Add:=20=E6=94=AF=E6=8C=81=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=20details=20=E7=9F=AD=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20js=20=E5=9E=AB=E7=89=87=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Contents.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'libs/Contents.php') diff --git a/libs/Contents.php b/libs/Contents.php index 9547e95..055d4ce 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -13,7 +13,7 @@ class Contents $text = empty($last) ? $data : $last; if ($widget instanceof Widget_Archive) { //ParseOther - $text = Contents::parsePicShadow(Contents::parseNotice(Contents::parseKbd(Contents::parseCode(Contents::parseImages(Contents::parseHeadings(Contents::parseTextColor(Contents::parseRuby(Contents::parseTip($text))))))))); + $text = Contents::parseDetails(Contents::parsePicShadow(Contents::parseNotice(Contents::parseKbd(Contents::parseCode(Contents::parseImages(Contents::parseHeadings(Contents::parseTextColor(Contents::parseRuby(Contents::parseTip($text)))))))))); //LazyLoad $text = preg_replace('//','',$text); //owo @@ -209,7 +209,15 @@ class Contents static public function parseKbd($text) { $text = preg_replace('/\[\[(.*?)\]\]/s','${1}',$text); return $text; - } + } + + /** + * 解析
+ */ + static public function parseDetails($text) { + $text = preg_replace('/\[details sum="(.*?)"\](.*?)\[\/details\]/s','
${1}${2}
',$text); + return $text; + } /** * 解析章节链接 -- cgit v1.2.3