diff --git a/Michelf/MarkdownExtra.php b/Michelf/MarkdownExtra.php index f814cde..9a54551 100644 --- a/Michelf/MarkdownExtra.php +++ b/Michelf/MarkdownExtra.php @@ -499,7 +499,7 @@ protected function _hashHTMLBlocks_inMarkdown($text, $indent = 0, $parsed .= $parts[0]; // Text before current tag. // If end of $text has been reached. Stop loop. - if (count($parts) < 3) { + if ($parts === false || count($parts) < 3) { $text = ""; break; }