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
1017f22c
Commit
1017f22c
authored
Jan 18, 2014
by
Emanuil Rusev
Browse files
fix paragraph list
parent
88854955
Changes
3
Hide whitespace changes
Inline
Side-by-side
Parsedown.php
View file @
1017f22c
...
...
@@ -324,8 +324,6 @@ class Parsedown
if
(
$element
[
'type'
]
===
'paragraph'
and
isset
(
$element
[
'interrupted'
])
===
false
)
{
$is_heading
=
true
;
$chopped_line
=
rtrim
(
$line
);
$i
=
1
;
...
...
@@ -334,19 +332,14 @@ class Parsedown
{
if
(
$chopped_line
[
$i
]
!==
$line
[
0
])
{
$is_heading
=
false
;
break
;
break
2
;
}
$i
++
;
}
if
(
$is_heading
)
{
$element
[
'type'
]
=
'heading'
;
$element
[
'level'
]
=
$line
[
0
]
===
'-'
?
2
:
1
;
}
$element
[
'type'
]
=
'heading'
;
$element
[
'level'
]
=
$line
[
0
]
===
'-'
?
2
:
1
;
continue
2
;
}
...
...
tests/data/paragraph_list.html
0 → 100644
View file @
1017f22c
<p>
paragraph
</p>
<ul>
<li>
li
</li>
<li>
li
</li>
</ul>
<p>
paragraph
</p>
<ul>
<li>
<p>
li
</p>
</li>
<li>
li
</li>
</ul>
\ No newline at end of file
tests/data/paragraph_list.md
0 → 100644
View file @
1017f22c
paragraph
-
li
-
li
paragraph
*
li
*
li
\ No newline at end of file
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