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
8954b945
Commit
8954b945
authored
Jul 24, 2013
by
Emanuil
Browse files
setext headings should support inline elements
parent
4e646950
Changes
1
Hide whitespace changes
Inline
Side-by-side
Parsedown.php
View file @
8954b945
...
...
@@ -432,12 +432,13 @@ class Parsedown
{
if
(
$line
[
0
]
===
$setext_character
and
preg_match
(
'/^['
.
$setext_character
.
']+[ ]*$/'
,
$line
))
{
$
atx
_heading_level
=
$index
+
1
;
$
setext
_heading_level
=
$index
+
1
;
$
markup
.
=
'<h'
.
$atx_heading_level
.
'>'
.
$paragraph
.
'</h'
.
$atx_heading_level
.
'>'
.
"
\n
"
;
$
setext_heading_text
=
$this
->
parse_inline_elements
(
$paragraph
)
;
unset
(
$paragraph
);
unset
(
$line
);
$markup
.
=
'<h'
.
$setext_heading_level
.
'>'
.
$setext_heading_text
.
'</h'
.
$setext_heading_level
.
'>'
.
"
\n
"
;
unset
(
$paragraph
,
$line
);
continue
2
;
}
...
...
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