diff --git a/app/Console/Commands/Test.php b/app/Console/Commands/Test.php index 9dbb6b2c..9968c204 100644 --- a/app/Console/Commands/Test.php +++ b/app/Console/Commands/Test.php @@ -95,7 +95,7 @@ class Test extends Command */ public function handle() { - $logFile = getLogFile("seed-points"); + $logFile = format_description('[img=http://www.baidu.com][img]http://www.baidu.com[/img]'); dd($logFile); } diff --git a/include/constants.php b/include/constants.php index 98614a1e..e5d84a99 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,6 +1,6 @@ $matches[1] ] ]; + } elseif (preg_match('/\[img=(.*)\]/isU', $item, $matches)) { + //是否图片 + $results[] = [ + 'type' => 'image', + 'data' => [ + 'url' => $matches[1] + ] + ]; } elseif (preg_match('/\[url=(.*)\](.*)\[\/url\]/isU', $item, $matches)) { $results[] = [ 'type' => 'url',