mirror of
https://github.com/erusev/parsedown.git
synced 2025-09-02 19:32:35 +02:00
leading \n characters should not be parsed as part of first block
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user