Atx headers: Don't require space after ###. [jgm/peg-markdown]

See https://github.com/jgm/peg-markdown/commit/6515556
This commit is contained in:
Michael Teichgräber 2011-02-21 02:55:06 +01:00
parent 9a0423b225
commit 33ef9ad6bc

View File

@ -136,7 +136,7 @@ AtxInline = !Newline !(Sp? '#'* Sp Newline) Inline
AtxStart = &'#' < ( "######" | "#####" | "####" | "###" | "##" | "#" ) > AtxStart = &'#' < ( "######" | "#####" | "####" | "###" | "##" | "#" ) >
{ $$ = mk_element(H1 + (len(yytext) - 1)) } { $$ = mk_element(H1 + (len(yytext) - 1)) }
AtxHeading = s:AtxStart Sp a:StartList ( AtxInline { a = cons($$, a) } )+ (Sp? '#'* Sp)? Newline AtxHeading = s:AtxStart Sp? a:StartList ( AtxInline { a = cons($$, a) } )+ (Sp? '#'* Sp)? Newline
{ $$ = mk_list(s.key, a) { $$ = mk_list(s.key, a)
s = nil } s = nil }