From 774fe75d47006e51212e4d4f379e716e1b13d2b9 Mon Sep 17 00:00:00 2001 From: Michel Fortin Date: Sat, 7 Jun 2008 10:18:59 -0400 Subject: [PATCH] Fixed Extra's header parser to work correctly with empty list item. --- markdown.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/markdown.php b/markdown.php index 7c74aac..1128353 100644 --- a/markdown.php +++ b/markdown.php @@ -2209,6 +2209,8 @@ class MarkdownExtra_Parser extends Markdown_Parser { return " id=\"$attr\""; } function _doHeaders_callback_setext($matches) { + if ($matches[3] == '-' && preg_match('{^- }', $matches[1])) + return $matches[0]; $level = $matches[3]{0} == '=' ? 1 : 2; $attr = $this->_doHeaders_attr($id =& $matches[2]); $block = "".$this->runSpanGamut($matches[1])."";