From 9ef7095303787661b3d1f07888d77cf2a4a564eb Mon Sep 17 00:00:00 2001
From: Dominique Fournier
"; // ##### Title5 - $search[] = "/^##### (.+)( +#*)$/Um"; + $search[] = "/^##### (.+)( +#+)?$/Um"; $replace[] = "
"; // #### Title4 - $search[] = "/^#### (.+)( +#*)$/Um"; + $search[] = "/^#### (.+)( +#+)?$/Um"; $replace[] = "
"; // ### Title3 - $search[] = "/^### (.+)( +#*)$/Um"; + $search[] = "/^### (.+)( +#+)?$/Um"; $replace[] = "
"; // ## Title2 - $search[] = "/^## (.+)( +#*)$/Um"; + $search[] = "/^## (.+)( +#+)?$/Um"; $replace[] = "
"; // # Title1 - $search[] = "/^# (.+)( +#*)$/Um"; + $search[] = "/^# (.+)( +#+)?$/Um"; $replace[] = "
";
// End of line with double space :
$search[] = "/( )$/Um"; $replace[] = "
";
@@ -294,8 +294,6 @@ class markdown
if (end ($typeStack))
{
$this->debugMKD ("DEB2 : CODE : Close older HTML");
- // Remove last \n to put closing tag at the end of line
- $res = substr ($res, 0, -1);
$oldType = array_pop ($typeStack);
$this->debugMKD (str_repeat (" ", end ($indentStack))."$oldType>");
$res .= str_repeat (" ", end ($indentStack))."$oldType>";