diff --git a/Michelf/MarkdownExtra.php b/Michelf/MarkdownExtra.php index f814cde..c27183d 100644 --- a/Michelf/MarkdownExtra.php +++ b/Michelf/MarkdownExtra.php @@ -229,7 +229,7 @@ class MarkdownExtra extends \Michelf\Markdown { } // Split on components - preg_match_all('/[#.a-z][-_:a-zA-Z0-9=]+/', $attr, $matches); + preg_match_all('/[#.a-z][-_:a-zA-Z0-9=]+/', $attr ?? '', $matches); $elements = $matches[0]; // Handle classes and IDs (only first ID taken into account)