From 0f88c27635f641d8b4afbb3cc4803cadd4eea3b4 Mon Sep 17 00:00:00 2001 From: BigCoke233 Date: Tue, 14 Apr 2020 15:51:17 +0800 Subject: =?UTF-8?q?:shaved=5Fice:=20Add:=20=E7=9F=AD=E9=93=BE=E6=8E=A5=20[?= =?UTF-8?q?shadow]?= 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') diff --git a/libs/Contents.php b/libs/Contents.php index 992d6f0..e65d81b 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -14,7 +14,7 @@ class Contents $text = empty($last) ? $data : $last; if ($widget instanceof Widget_Archive) { //ParseOther - $text = Contents::parseKbd(Contents::parseCode(Contents::parseImages(Contents::parseHeadings(Contents::parseTextColor(Contents::parseRuby(Contents::parseTip($text))))))); + $text = 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 @@ -72,7 +72,15 @@ class Contents * 解析 Notice */ static public function parseNotice($text){ - $text = preg_replace('/\[notice\](.*?)\[\/notice\]/s','

${1}

',$text); + $text = preg_replace('/\[notice\](.*?)\[\/notice\]/s','
${1}
',$text); + return $text; + } + + /** + * 图片加阴影 + */ + static public function parsePicShadow($text){ + $text = preg_replace('/\[shadow\](.*?)\[\/shadow\]/s','
${1}
',$text); return $text; } -- cgit v1.2.3