1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

setext headings should support inline elements

This commit is contained in:
Emanuil 2013-07-24 00:52:35 +03:00
parent 4e64695055
commit 8954b94516

View File

@ -432,12 +432,13 @@ class Parsedown
{ {
if ($line[0] === $setext_character and preg_match('/^['.$setext_character.']+[ ]*$/', $line)) if ($line[0] === $setext_character and preg_match('/^['.$setext_character.']+[ ]*$/', $line))
{ {
$atx_heading_level = $index + 1; $setext_heading_level = $index + 1;
$markup .= '<h'.$atx_heading_level.'>'.$paragraph.'</h'.$atx_heading_level.'>'."\n"; $setext_heading_text = $this->parse_inline_elements($paragraph);
unset($paragraph); $markup .= '<h'.$setext_heading_level.'>'.$setext_heading_text.'</h'.$setext_heading_level.'>'."\n";
unset($line);
unset($paragraph, $line);
continue 2; continue 2;
} }