diff --git a/markdown.php b/markdown.php index ea9abda..8e00b9e 100644 --- a/markdown.php +++ b/markdown.php @@ -36,7 +36,7 @@ class markdown // SEPARATORS : *** --- ___ * * * - - - _ _ _ // Must be placed before EMPHASIS $search[] = "/^[*_-] ?[*_-] ?[*_-]$/Um"; - $replace[] = "
\n"; + $replace[] = "\n
\n
", "", $res); return $res; } @@ -187,14 +188,14 @@ class markdown if ($oldType === "code") { $this->debugMKD (""); - $res .= "\n"; + $res .= ""; array_pop ($htmlStack); array_pop ($indentStack); } else { $this->debugMKD (str_repeat (" ", end ($indentStack))."$oldType>"); - $res .= str_repeat (" ", end ($indentStack))."$oldType>\n"; + $res .= str_repeat (" ", end ($indentStack))."$oldType>"; } array_pop ($indentStack); array_pop ($htmlStack); @@ -232,7 +233,7 @@ class markdown if (end ($typeStack) !== FALSE) { // Remove last \n to put closing tag at the end of line - $res = substr ($res, 0, -1); + //$res = substr ($res, 0, -1); $oldType = array_pop ($typeStack); $this->debugMKD (str_repeat (" ", end ($indentStack))."$oldType>"); $res .= str_repeat (" ", end ($indentStack))."$oldType>";