Require newline after Reference. [jgm/peg-markdown]

See https://github.com/jgm/peg-markdown/commit/fff88fe
This commit is contained in:
Michael Teichgräber 2012-04-30 01:14:31 +02:00
parent 34ea4be8c6
commit eb8169a8e5
3 changed files with 7 additions and 7 deletions

View File

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

View File

@ -28,7 +28,7 @@ import (
) )
const ( const (
parserIfaceVersion_3 = iota parserIfaceVersion_4 = iota
) )
// Semantic value of a parsing action. // Semantic value of a parsing action.
@ -630,7 +630,7 @@ AutoLinkEmail = '<' < [-A-Za-z0-9+_]+ '@' ( !Newline !'>' . )+ > '>'
$$ = p.mkLink(p.mkString(yytext), "mailto:"+yytext, "") $$ = p.mkLink(p.mkString(yytext), "mailto:"+yytext, "")
} }
Reference = NonindentSpace !"[]" l:Label ':' Spnl s:RefSrc Spnl t:RefTitle BlankLine* Reference = NonindentSpace !"[]" l:Label ':' Spnl s:RefSrc t:RefTitle BlankLine+
{ $$ = p.mkLink(l.children, s.contents.str, t.contents.str) { $$ = p.mkLink(l.children, s.contents.str, t.contents.str)
s = nil s = nil
t = nil t = nil
@ -652,11 +652,11 @@ RefTitle = ( RefTitleSingle | RefTitleDouble | RefTitleParens | EmptyTitle )
EmptyTitle = < "" > EmptyTitle = < "" >
RefTitleSingle = '\'' < ( !( '\'' Sp Newline | Newline ) . )* > '\'' RefTitleSingle = Spnl '\'' < ( !( '\'' Sp Newline | Newline ) . )* > '\''
RefTitleDouble = '"' < ( !('"' Sp Newline | Newline) . )* > '"' RefTitleDouble = Spnl '"' < ( !('"' Sp Newline | Newline) . )* > '"'
RefTitleParens = '(' < ( !(')' Sp Newline | Newline) . )* > ')' RefTitleParens = Spnl '(' < ( !(')' Sp Newline | Newline) . )* > ')'
References = a:StartList References = a:StartList
( b:Reference { a = cons(b, a) } | SkipBlock )* ( b:Reference { a = cons(b, a) } | SkipBlock )*

2
portid
View File

@ -1 +1 @@
161 162