diff options
| author | Jonas Smedegaard <dr@jones.dk> | 2025-05-26 10:56:14 +0200 |
|---|---|---|
| committer | Jonas Smedegaard <dr@jones.dk> | 2025-05-26 11:40:24 +0200 |
| commit | bd8c87a53621a3e1e421c22caf30571a90db398c (patch) | |
| tree | e85f440a1cbe8572a0d895c5f365c0caed25b58d /syntax/def.peg | |
| parent | 393fbb26231c57309e8bfa92c9b209c5f4b6c70e (diff) | |
fix define BlockX as PEG; prioritise definition blocks
Diffstat (limited to 'syntax/def.peg')
| -rw-r--r-- | syntax/def.peg | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/syntax/def.peg b/syntax/def.peg index ab809ac..7696a0d 100644 --- a/syntax/def.peg +++ b/syntax/def.peg @@ -8,9 +8,9 @@ Markdown <- ('---' NEWLINE MetaBlock* '---' NEWLINE)? Block* # Block elements -Block <- Header +Block <- LinkDefinition + / Header / List - / LinkDefinition / Paragraph Header <- '#'+ SPACE* !NEWLINE Words? SPACE* NEWLINE List <- ([-*]+ / [[:digit:]]+ [).]) (_ (List / Words))? NEWLINE @@ -49,6 +49,11 @@ NEWLINE <- '\r\n' # Semantic Markdown # @see <https://source.jones.dk/semantic-markdown/about/> +BlockX <- LinkDefinition + / PrefixDefinition + / Header + / List + / Paragraph PrefixDefinition <- '{' CuriePrefix '}' ':' _? SemWord NEWLINE AnnotatedWordsX <- '[' Words ']' ('{' (SemWords / ![{}] PlainWords) '}') |
