增加一个图片文件转存的功能
This commit is contained in:
@@ -128,7 +128,10 @@ if ($pr_flag) {
|
||||
strpos($s, "class=\"md") === false
|
||||
) // 没找到,那就加上
|
||||
$s = "<span class='md'>" . $s . "</span>";
|
||||
// $s = html_entity_decode($str, ENT_QUOTES, 'UTF-8');
|
||||
// 删除代码块里的<br />防止引起混乱
|
||||
$s = preg_replace_callback('/(```.*?```|`[^`]*`)/s', function ($matches) {
|
||||
return str_replace('<br />', '', $matches[0]);
|
||||
}, $s);
|
||||
// 特殊转义
|
||||
$s = str_replace("<br />", "\n", $s);
|
||||
return $s;
|
||||
|
||||
Reference in New Issue
Block a user