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
|
// rebuild it using
|
||||||
// make nuke
|
// make nuke
|
||||||
// make parser
|
// make parser
|
||||||
needParserIfaceVersion = parserIfaceVersion_1
|
needParserIfaceVersion = parserIfaceVersion_2
|
||||||
)
|
)
|
||||||
|
|
||||||
// Markdown Options:
|
// Markdown Options:
|
||||||
|
@ -28,7 +28,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
parserIfaceVersion_1 = iota
|
parserIfaceVersion_2 = iota
|
||||||
)
|
)
|
||||||
|
|
||||||
// Semantic value of a parsing action.
|
// Semantic value of a parsing action.
|
||||||
@ -153,11 +153,11 @@ SetextBottom1 = "===" '='* Newline
|
|||||||
SetextBottom2 = "---" '-'* Newline
|
SetextBottom2 = "---" '-'* Newline
|
||||||
|
|
||||||
SetextHeading1 = &(RawLine SetextBottom1)
|
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) }
|
SetextBottom1 { $$ = p.mkList(H1, a) }
|
||||||
|
|
||||||
SetextHeading2 = &(RawLine SetextBottom2)
|
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) }
|
SetextBottom2 { $$ = p.mkList(H2, a) }
|
||||||
|
|
||||||
Heading = AtxHeading | SetextHeading
|
Heading = AtxHeading | SetextHeading
|
||||||
|
Loading…
Reference in New Issue
Block a user