diff options
| author | Jonas Smedegaard <dr@jones.dk> | 2025-05-18 12:41:35 +0200 |
|---|---|---|
| committer | Jonas Smedegaard <dr@jones.dk> | 2025-05-18 14:05:02 +0200 |
| commit | 90d5b0125fb943eea852ab14ed7a8243c86d7d21 (patch) | |
| tree | adcd22463cc5b7654551db156b9f737741475edb /def.peg | |
| parent | ba1aaf9246f7371bc4c4f8e6636baf44ddf28444 (diff) | |
define LinkTitle
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 |
