last things, webp images all aboard
This commit is contained in:
@@ -42,10 +42,10 @@ class Markdown extends \Parsedown {
|
||||
if (preg_match('/\:(\w+)\:/mUs', $Excerpt['text'], $matches)) {
|
||||
$path = "images/comments/" . $matches[1];
|
||||
$file_ext = "";
|
||||
if(file_exists($path . ".png"))
|
||||
$file_ext = ".png";
|
||||
else if(file_exists($path . ".gif"))
|
||||
$file_ext = ".gif";
|
||||
if(file_exists($path . ".webp"))
|
||||
$file_ext = ".webp";
|
||||
else if(file_exists($path . ".webp"))
|
||||
$file_ext = ".webp";
|
||||
if($file_ext === "")
|
||||
return;
|
||||
return [
|
||||
@@ -55,7 +55,7 @@ class Markdown extends \Parsedown {
|
||||
'handler' => 'line',
|
||||
'attributes' => [
|
||||
'class' => 'comment_emoji',
|
||||
'src' => '//s.w0bm.com/images/comments/' . $matches[1] . $file_ext,
|
||||
'src' => '//w0bm.com/images/comments/' . $matches[1] . $file_ext,
|
||||
'alt' => ':' . $matches[1] . ':',
|
||||
'title' => ':' . $matches[1] . ':'
|
||||
],
|
||||
|
Reference in New Issue
Block a user