From 0a5e33b54d7b67abfd739dff48770f753e1701dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Teichgr=C3=A4ber?= Date: Mon, 30 Apr 2012 01:04:43 +0200 Subject: [PATCH] Fixed bug in setext headers. [jgm/peg-markdown] See https://github.com/jgm/peg-markdown/commit/d57e706 --- markdown.go | 2 +- parser.leg | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/markdown.go b/markdown.go index 06dddcf..2fcafec 100644 --- a/markdown.go +++ b/markdown.go @@ -31,7 +31,7 @@ const ( // rebuild it using // make nuke // make parser - needParserIfaceVersion = parserIfaceVersion_1 + needParserIfaceVersion = parserIfaceVersion_2 ) // Markdown Options: diff --git a/parser.leg b/parser.leg index 3929c43..0fbcbf0 100644 --- a/parser.leg +++ b/parser.leg @@ -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