mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
leading \n characters should not be parsed as part of first block
This commit is contained in:
parent
40c2dcfac7
commit
0352f01c7e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user