From 8b264c38fe73bbbf724cd12e4233fe831248f526 Mon Sep 17 00:00:00 2001
From: Michael
', $text); - $text = preg_replace("(\[h2\](.*?)\[\/h2\])ism", '
', $text); - $text = preg_replace("(\[h3\](.*?)\[\/h3\])ism", '
', $text); - $text = preg_replace("(\[h4\](.*?)\[\/h4\])ism", '
', $text); - $text = preg_replace("(\[h5\](.*?)\[\/h5\])ism", '
', $text); - $text = preg_replace("(\[h6\](.*?)\[\/h6\])ism", '
', $text); + + if ($simple_html == self::INTERNAL) { + //Ensure to always start with
", $text); + $heading--; + } + } + } + } else { + $text = preg_replace("(\[h1\](.*?)\[\/h1\])ism", '
', $text); + $text = preg_replace("(\[h2\](.*?)\[\/h2\])ism", '
', $text); + $text = preg_replace("(\[h3\](.*?)\[\/h3\])ism", '
', $text); + $text = preg_replace("(\[h4\](.*?)\[\/h4\])ism", '
', $text); + $text = preg_replace("(\[h5\](.*?)\[\/h5\])ism", '
', $text); + $text = preg_replace("(\[h6\](.*?)\[\/h6\])ism", '
', $text); + } // Check for paragraph $text = preg_replace("(\[p\](.*?)\[\/p\])ism", '
$1
', $text); From a198108222d26cfa4a899393fb48c8a91a0c1f12 Mon Sep 17 00:00:00 2001 From: MichaelThis is a paragraph
with a line feed.
Second Chapter
', - 'text' => "[h1]Header[/h1][ul][*]One[*]Two[/ul]\n\nThis is a paragraph\nwith a line feed.\n\nSecond Chapter", + 'expectedHTML' => 'This is a paragraph
with a line feed.
Second Chapter
', + 'text' => "[h4]Header[/h4][ul][*]One[*]Two[/ul]\n\nThis is a paragraph\nwith a line feed.\n\nSecond Chapter", ], 'task-12900-header-with-paragraphs' => [ - 'expectedHTML' => 'Some Chapter
', - 'text' => '[h1]Header[/h1]Some Chapter', + 'expectedHTML' => 'Some Chapter
', + 'text' => '[h4]Header[/h4]Some Chapter', ], 'bug-12842-ul-newlines' => [ 'expectedHTML' => 'This is: