1
0
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:
Aidan Woods 2018-03-27 22:10:39 +01:00 committed by GitHub
commit 0550c3eaf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -505,7 +505,8 @@ class Parsedown
return;
}
$text = trim($Line['text'], '# ');
$text = trim($Line['text'], '#');
$text = trim($text, ' ');
$Block = array(
'element' => array(

View File

@ -7,3 +7,5 @@
<p>####### not a heading</p>
<h1>closed h1</h1>
<p>#</p>
<h1># of levels</h1>
<h1># of levels #</h1>

View File

@ -15,3 +15,7 @@
# closed h1 #
#
# # of levels
# # of levels # #