From be53d5a176d6bebd725047cfee698e1a6d27d9f7 Mon Sep 17 00:00:00 2001 From: murdercode Date: Wed, 22 Feb 2023 13:18:44 +0000 Subject: [PATCH] Fix styling --- src/Parsers/Instagram.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Parsers/Instagram.php b/src/Parsers/Instagram.php index a0a013c..57475ae 100644 --- a/src/Parsers/Instagram.php +++ b/src/Parsers/Instagram.php @@ -9,14 +9,13 @@ public static function parse(string $content): string return preg_replace_callback( '/\[instagram url="(.*?)"]/', function ($matches) { - $url = str_contains($matches[1], 'instagram.com') ? $matches[1] : null; $regex = '/\/p\/([a-zA-Z0-9_-]+)/'; preg_match($regex, $url, $matches); $post_id = $matches[1]; - $embed_url = "https://www.instagram.com/p/" . $post_id . "/embed"; + $embed_url = 'https://www.instagram.com/p/'.$post_id.'/embed'; if ($url) { return view('shortcode-plus::instagram', compact('embed_url'))->render(); }