diff options
| author | 阔落 <45323514+BigCoke233@users.noreply.github.com> | 2019-04-06 16:48:17 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-06 16:48:17 +0800 |
| commit | bf183e944f0cbb924b73c84d2c8cdb7b59d35eb1 (patch) | |
| tree | f6530294df83ec1991b92c5c8dfa64b224b34e34 /post/post-content.php | |
| parent | 43156f86f3e167f066e1a655baee71eaebbdad4b (diff) | |
修复无法评论问题,现在具有data-pjax特性的元素才能使pjax响应
Diffstat (limited to 'post/post-content.php')
| -rw-r--r-- | post/post-content.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/post/post-content.php b/post/post-content.php index a1fdd24..56d160d 100644 --- a/post/post-content.php +++ b/post/post-content.php @@ -1,7 +1,8 @@ <?php
$content = $this->content;
- $content = preg_replace('/<table(.*?)>/s','<table class="table table-striped table-hover">',$content);
+ $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);
|
