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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = trim($Line['text'], '# ');
|
$text = trim($Line['text'], '#');
|
||||||
|
$text = trim($text, ' ');
|
||||||
|
|
||||||
$Block = array(
|
$Block = array(
|
||||||
'element' => array(
|
'element' => array(
|
||||||
|
@ -6,4 +6,6 @@
|
|||||||
<h6>h6</h6>
|
<h6>h6</h6>
|
||||||
<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>
|
@ -14,4 +14,8 @@
|
|||||||
|
|
||||||
# closed h1 #
|
# closed h1 #
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# # of levels
|
||||||
|
|
||||||
|
# # of levels # #
|
Loading…
x
Reference in New Issue
Block a user