From 498448826d8762add15a524097e91e96b545a631 Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Mon, 13 Oct 2014 14:35:00 +0400 Subject: Parse directives in the form of {directive params}. Parse colons in text. --- src/Markdown/markdown.bnf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Markdown/markdown.bnf b/src/Markdown/markdown.bnf index d1cd305c..f3c484d5 100644 --- a/src/Markdown/markdown.bnf +++ b/src/Markdown/markdown.bnf @@ -47,6 +47,7 @@ Block ::= BlankLine* ( OrderedList | BulletList | HorizontalRule + | Directive | Para ) @@ -58,6 +59,10 @@ HorizontalRule ::= NonindentSpace | '_' OptionalSpace '_' OptionalSpace '_' (OptionalSpace '_')*) OptionalSpace EOL BlankLine+ +Directive ::= '{' DirectiveName DirectiveParams '}' +DirectiveName ::= Word +DirectiveParams ::= PlainText + Bullet ::= !HorizontalRule NonindentSpace ('+' | '*' | '-') Space+ Enumerator ::= NonindentSpace Number '.' Space+ @@ -76,7 +81,7 @@ ListContinuationBlock ::= BlankLine* (Indent ListBlock)+ // ---- INLINES ---- private Inlines ::= (!EndLine Inline | EndLine &Inline )+ EndLine? Inline ::= Strong | Emph | Code | Link | PlainText -PlainText ::= (Word | Number | Space+)+ +PlainText ::= (Word | Number | Space | ':')+ Emph ::= EmphStar | EmphUnderscore private EmphStar ::= '*' !Whitespace (!'*' Inline)+ '*' -- cgit