Commit 0352f01c authored by Emanuil's avatar Emanuil
Browse files

leading \n characters should not be parsed as part of first block

parent 40c2dcfa
......@@ -109,8 +109,10 @@ class Parsedown
private function parse_blocks($text)
{
$text = trim($text, "\n");
# Divides text into blocks.
$blocks = preg_split('/\n\s*\n/', $text, -1, PREG_SPLIT_NO_EMPTY);
$blocks = preg_split('/\n\s*\n/', $text);
# Makes sure compound blocks get rendered.
$blocks []= NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment