diff --git a/Parsedown.php b/Parsedown.php index eb1f88c..46d0715 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -1217,14 +1217,6 @@ class Parsedown return; } - if (preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $excerpt, $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - if ($excerpt[1] === '/' and preg_match('/^<\/\w*[ ]*>/s', $excerpt, $matches)) { return array( @@ -1240,6 +1232,14 @@ class Parsedown 'extent' => strlen($matches[0]), ); } + + if (preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $excerpt, $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } } protected function inlineCode($excerpt)