diff options
| author | BigCoke233 <hi@guhub.cn> | 2020-04-15 12:15:18 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2020-04-15 12:15:18 +0800 |
| commit | 7866c9f6a2353fd93a279b5a22872c52bb81b08b (patch) | |
| tree | 8ebfac54ff49ab61ec79f3ea551ef457f1bc21d6 /libs | |
| parent | ae0351105cebf8a3787d8ebb454a25f80dbe0e6d (diff) | |
:dizzy: Add: 支持解析图题
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/Contents.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/Contents.php b/libs/Contents.php index e65d81b..75aa833 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -29,8 +29,8 @@ class Contents * 解析图片 */ static public function parseImages($text){ - //FancyBox - $text = preg_replace('/<img(.*?)src="(.*?)"(.*?)alt="(.*?)"(.*?)>/s','<center><a data-fancybox="gallery" href="${2}" class="gallery-link"><img${1}src="${2}"${3}></a></center>',$text); + //FancyBox & 图题 + $text = 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>',$text); return $text; } |
