diff options
Diffstat (limited to 'def.peg')
| -rw-r--r-- | def.peg | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -11,17 +11,20 @@ Markdown <- MetaBlock* Block* Block <- Header / List / LinkDefinition / Paragraph Header <- '#'+ SPACE* !NEWLINE Words? SPACE* NEWLINE List <- ([-*]+ / [[:digit:]]+ [).]) (_ (List / Words))? NEWLINE -LinkDefinition <- LinkLabel ':' _? Uri (_ '"' !'"' PlainWords '"')? NEWLINE +LinkDefinition <- LinkLabel ':' _? Uri (_ LinkTitle)? NEWLINE Paragraph <- Words (HardBreak Words)* NEWLINE+ # Inline elements Words <- StyledWords / LinkedWords / AnnotatedWords / PlainWords StyledWords <- '*' Words '*' / '**' Words '**' / '_' Words '_' -LinkedWords <- '[' Words ']' '(' Uri ')' +LinkedWords <- '[' Words ']' '(' ((Uri _)? LinkTitle / Uri) ')' / '[' Words ']' LinkLabel / LinkLabel AnnotatedWords <- '[' Words ']' '{' ![{}] PlainWords '}' LinkLabel <- '[' _? ![\[\]] PlainWords _? ']' +LinkTitle <- '"' _? !'"' _? PlainWords _? '"' + / "'" _? !"'" PlainWords _? "'" + / "(" _? ![()] PlainWords _? ")" PlainWords <- PRINTABLES (_ PRINTABLES)* Uri <- '<' ![<>] PRINTABLES? '>' / ![<>] PRINTABLES HardBreak <- SPACE SPACE+ NEWLINE |
