Fixed bug in setext headers. [jgm/peg-markdown]

See https://github.com/jgm/peg-markdown/commit/d57e706
This commit is contained in:
Michael Teichgräber 2012-04-30 01:04:43 +02:00
parent 1bbd55c017
commit 0a5e33b54d
2 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ const (
// rebuild it using
// make nuke
// make parser
needParserIfaceVersion = parserIfaceVersion_1
needParserIfaceVersion = parserIfaceVersion_2
)
// Markdown Options:

View File

@ -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