Fixed bug in setext headers. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/d57e706
This commit is contained in:
parent
1bbd55c017
commit
0a5e33b54d
@ -31,7 +31,7 @@ const (
|
||||
// rebuild it using
|
||||
// make nuke
|
||||
// make parser
|
||||
needParserIfaceVersion = parserIfaceVersion_1
|
||||
needParserIfaceVersion = parserIfaceVersion_2
|
||||
)
|
||||
|
||||
// Markdown Options:
|
||||
|
@ -28,7 +28,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
parserIfaceVersion_1 = iota
|
||||
parserIfaceVersion_2 = iota
|
||||
)
|
||||
|
||||
// Semantic value of a parsing action.
|
||||
@ -153,11 +153,11 @@ SetextBottom1 = "===" '='* Newline
|
||||
SetextBottom2 = "---" '-'* Newline
|
||||
|
||||
SetextHeading1 = &(RawLine SetextBottom1)
|
||||
a:StartList ( !Endline Inline { a = cons($$, a) } )+ Newline
|
||||
a:StartList ( !Endline Inline { a = cons($$, a) } )+ Sp? Newline
|
||||
SetextBottom1 { $$ = p.mkList(H1, a) }
|
||||
|
||||
SetextHeading2 = &(RawLine SetextBottom2)
|
||||
a:StartList ( !Endline Inline { a = cons($$, a) } )+ Newline
|
||||
a:StartList ( !Endline Inline { a = cons($$, a) } )+ Sp? Newline
|
||||
SetextBottom2 { $$ = p.mkList(H2, a) }
|
||||
|
||||
Heading = AtxHeading | SetextHeading
|
||||
|
Loading…
Reference in New Issue
Block a user