diff options
| author | Jonas Smedegaard <dr@jones.dk> | 2025-05-18 09:57:49 +0200 |
|---|---|---|
| committer | Jonas Smedegaard <dr@jones.dk> | 2025-05-18 14:04:19 +0200 |
| commit | 72827171201ee9c022a6a8c30107e55a16c3826c (patch) | |
| tree | 8c65ca47565cf6deda0a39b8dfafe93f01a23a3e /def.peg | |
| parent | d12d53a62ec7f0d1cf71eba54dbdc7925c922104 (diff) | |
define LinkLabel
Diffstat (limited to 'def.peg')
| -rw-r--r-- | def.peg | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -12,7 +12,7 @@ Block <- Header / List / LinkDefinition / Paragraph Header <- '#'+ SPACE* Words? SPACE* NEWLINE List <- ([-*]+ / [[:digit:]]+ [).]) (SPACE+ (List / Words))? NEWLINE -LinkDefinition <- '[' !'[]' PlainWords ']' ':' SPACE Uri NEWLINE +LinkDefinition <- LinkLabel ':' SPACE Uri NEWLINE SPACE SPACE '"' !'"' PlainWords '"' NEWLINE Paragraph <- (Words (SPACE? NEWLINE / HardBreak))+ NEWLINE+ @@ -21,9 +21,10 @@ Paragraph <- (Words (SPACE? NEWLINE / HardBreak))+ Words <- StyledWords / LinkedWords / AnnotatedWords / PlainWords StyledWords <- '*' Words '*' / '**' Words '**' / '_' Words '_' LinkedWords <- '[' Words ']' '(' Uri ')' - / '[' Words ']' '[' ![\[\]] LinkDefinitionKeyphrase ']' - / '[' LinkDefinitionKeyphrase ']' + / '[' Words ']' LinkLabel + / LinkLabel AnnotatedWords <- '[' Words ']' '{' ![{}] PlainWords '}' +LinkLabel <- '[' SPACE? ![\[\]] PlainWords SPACE? ']' PlainWords <- PRINTABLES (SPACE PRINTABLES)* Uri <- '<' ![<>] PRINTABLES? '>' / ![<>] PRINTABLES HardBreak <- SPACE SPACE+ NEWLINE |
