Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CentralNic
parsedown
Commits
0352f01c
Commit
0352f01c
authored
Aug 31, 2013
by
Emanuil
Browse files
leading \n characters should not be parsed as part of first block
parent
40c2dcfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Parsedown.php
View file @
0352f01c
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment