From c1523ab0481dc5e48bf335e68cd3f3a488e7e99e Mon Sep 17 00:00:00 2001 From: Eltrac <45323514+BigCoke233@users.noreply.github.com> Date: Mon, 15 Jul 2019 17:43:49 +0800 Subject: =?UTF-8?q?=E6=96=87=E7=AB=A0=E7=9F=AD=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Contents.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/Contents.php b/libs/Contents.php index fd2c8f1..d441577 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -8,16 +8,25 @@ class Contents */ static public function parseContent($text) { + //Prism 高亮 $text = preg_replace('/
/s','',$text);
+ //FancyBox
$text = preg_replace('/
/s','![]()
',$text);
//LazyLoad
$text = preg_replace('/
/','
',$text);
+ //气泡
+ $text = preg_replace('/\[bubble\](.*?)\[\/bubble\]/s','',$text);
+
+ //Tip without var
+ $text = preg_replace('/\[tip\](.*?)\[\/tip\]/s','${1}',$text);
+ //Tip
+ $text = preg_replace('/\[tip type="(.*?)"\](.*?)\[\/tip\]/s','${2}',$text);
+
//解析友链盒子
$reg = '/\[links\](.*?)\[\/links\]/s';
$rp = '${1}';
$text = preg_replace($reg,$rp,$text);
-
//解析友链项目
$reg = '/\[(.*?)\]\{(.*?)\}\((.*?)\)/s';
$rp = '
--
cgit v1.2.3