mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Support #hashtag per CommonMark and GFM specs
This commit is contained in:
parent
68736f8800
commit
8a90586218
@ -519,6 +519,11 @@ class Parsedown
|
||||
}
|
||||
|
||||
$text = trim($Line['text'], '#');
|
||||
|
||||
if (!isset($text[0]) or $text[0] !== ' ') {
|
||||
return;
|
||||
}
|
||||
|
||||
$text = trim($text, ' ');
|
||||
|
||||
$Block = array(
|
||||
|
@ -7,5 +7,7 @@
|
||||
<p>####### not a heading</p>
|
||||
<h1>closed h1</h1>
|
||||
<p>#</p>
|
||||
<p>##</p>
|
||||
<h1># of levels</h1>
|
||||
<h1># of levels #</h1>
|
||||
<h1># of levels #</h1>
|
||||
<p>#hashtag</p>
|
@ -16,6 +16,10 @@
|
||||
|
||||
#
|
||||
|
||||
##
|
||||
|
||||
# # of levels
|
||||
|
||||
# # of levels # #
|
||||
# # of levels # #
|
||||
|
||||
#hashtag
|
Loading…
Reference in New Issue
Block a user