diff --git a/Michelf/MarkdownExtra.php b/Michelf/MarkdownExtra.php index f814cde..bc12382 100644 --- a/Michelf/MarkdownExtra.php +++ b/Michelf/MarkdownExtra.php @@ -224,7 +224,7 @@ protected function teardown() { * @return string */ protected function doExtraAttributes($tag_name, $attr, $defaultIdValue = null, $classes = array()) { - if (empty($attr) && !$defaultIdValue && empty($classes)) { + if (is_null($attr) || (empty($attr) && !$defaultIdValue && empty($classes))) { return ""; }