mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Merge pull request #583 from aidantwoods/fix/atx-headings
Fix trimming of internal #'s in ATX headers
This commit is contained in:
commit
0550c3eaf9
@ -506,6 +506,7 @@ class Parsedown
|
|||||||
}
|
}
|
||||||
|
|
||||||
$text = trim($Line['text'], '#');
|
$text = trim($Line['text'], '#');
|
||||||
|
$text = trim($text, ' ');
|
||||||
|
|
||||||
$Block = array(
|
$Block = array(
|
||||||
'element' => array(
|
'element' => array(
|
||||||
|
@ -7,3 +7,5 @@
|
|||||||
<p>####### not a heading</p>
|
<p>####### not a heading</p>
|
||||||
<h1>closed h1</h1>
|
<h1>closed h1</h1>
|
||||||
<p>#</p>
|
<p>#</p>
|
||||||
|
<h1># of levels</h1>
|
||||||
|
<h1># of levels #</h1>
|
@ -15,3 +15,7 @@
|
|||||||
# closed h1 #
|
# closed h1 #
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# # of levels
|
||||||
|
|
||||||
|
# # of levels # #
|
Loading…
x
Reference in New Issue
Block a user