summaryrefslogtreecommitdiff
path: root/post/post-content.php
diff options
context:
space:
mode:
Diffstat (limited to 'post/post-content.php')
-rw-r--r--post/post-content.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/post/post-content.php b/post/post-content.php
index 56d160d..068f6a1 100644
--- a/post/post-content.php
+++ b/post/post-content.php
@@ -4,8 +4,8 @@
$content = preg_replace('/<a(.*?)>/s','<a ${1} data-pjax>',$content);
$content = preg_replace('/<table(.*?)>/s','<table class="table table-striped table-hover table-bordered">',$content);
$content = preg_replace('/<pre><code>/s','<pre><code class="language-html">',$content);
- $content = preg_replace('/<img(.*?)src="(.*?)"(.*?)alt="(.*?)"(.*?)>/s','<a data-fancybox="gallery" href="${2}" class="gallery-link"><img${1}src="${2}"${3}></a><span class="post-img-alt">${4}</span>',$content);
-
+ $content = preg_replace('/<img(.*?)src="(.*?)"(.*?)alt="(.*?)"(.*?)>/s','<center><a data-fancybox="gallery" href="${2}" class="gallery-link"><img${1}src="${2}"${3}></a><span class="post-img-alt">${4}</span></center>',$content);
+
//短代码(无参数)
$reg = '/\[scode\](.*?)\[\/scode\]/s';
$rp = '<div class="tip">${1}</div>';