summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorEltrac Koalar <hi@guhub.cn>2020-05-05 19:23:03 +0800
committerGitHub <noreply@github.com>2020-05-05 19:23:03 +0800
commit0864771ac37fe4c82a180e179c504a4143580f31 (patch)
treef6d61543a089553f8b2d686e5ea4ef35681bc184 /libs
parent8f6407cbb3acebe0a096758c118531783ce2105c (diff)
:zap: Perf: 将 kbd 的短代吗修改为 [[kbd]]
Diffstat (limited to 'libs')
-rw-r--r--libs/Contents.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/Contents.php b/libs/Contents.php
index 2d27671..e949543 100644
--- a/libs/Contents.php
+++ b/libs/Contents.php
@@ -8,7 +8,7 @@ class Contents
*/
static public function parseContent($data, $widget, $last)
{
- $db=Typecho_Db::get();
+ $db=Typecho_Db::get();
$load_image = $db->fetchAll($db->select('value')->from('table.options')->where('name = %s', "theme:Miracles")->limit(1));
$load_image = explode("\";",explode("\"",explode("\"loading_image\";",$load_image[0]["value"],2)[1],2)[1],2)[0];
$text = empty($last) ? $data : $last;
@@ -208,7 +208,7 @@ class Contents
* 解析键盘按键
*/
static public function parseKbd($text) {
- $text = preg_replace('/\~(.*?)\~/s','<kbd>${1}</kbd>',$text);
+ $text = preg_replace('/\[\[(.*?)\]\]/s','<kbd>${1}</kbd>',$text);
return $text;
}
@@ -308,4 +308,4 @@ class Contents
), '', ' - ');
Helper::options()->title();
}
-} \ No newline at end of file
+}