parser.leg: AtxStart: do a quick lookahead for `#'
This commit is contained in:
parent
13d48d799e
commit
62502ab7a8
@ -129,7 +129,7 @@ Plain = a:Inlines
|
|||||||
|
|
||||||
AtxInline = !Newline !(Sp '#'* Sp Newline) Inline
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user