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
@ -505,7 +505,8 @@ class Parsedown
|
||||
return;
|
||||
}
|
||||
|
||||
$text = trim($Line['text'], '# ');
|
||||
$text = trim($Line['text'], '#');
|
||||
$text = trim($text, ' ');
|
||||
|
||||
$Block = array(
|
||||
'element' => array(
|
||||
|
@ -7,3 +7,5 @@
|
||||
<p>####### not a heading</p>
|
||||
<h1>closed h1</h1>
|
||||
<p>#</p>
|
||||
<h1># of levels</h1>
|
||||
<h1># of levels #</h1>
|
@ -15,3 +15,7 @@
|
||||
# closed h1 #
|
||||
|
||||
#
|
||||
|
||||
# # of levels
|
||||
|
||||
# # of levels # #
|
Loading…
Reference in New Issue
Block a user