diff options
| author | Jonas Smedegaard <dr@jones.dk> | 2025-05-26 10:18:42 +0200 |
|---|---|---|
| committer | Jonas Smedegaard <dr@jones.dk> | 2025-05-26 10:32:10 +0200 |
| commit | 75d54ad0c5d9bdcb02e9934401f1a23bc0645de7 (patch) | |
| tree | ab7fb3dd8e20b29c4c71c35533384728b5cae580 /_markdown.qmd | |
| parent | caee6369ebdee3d34f066042dea833ee37922481 (diff) | |
add syntax PrefixDefinition; improve text on Markdown
Diffstat (limited to '_markdown.qmd')
| -rw-r--r-- | _markdown.qmd | 48 |
1 files changed, 30 insertions, 18 deletions
diff --git a/_markdown.qmd b/_markdown.qmd index d038cc8..542b175 100644 --- a/_markdown.qmd +++ b/_markdown.qmd @@ -233,7 +233,7 @@ Syntax of `AnnotatedWords` and `LinkedWords`, extended with `SemWords`. ::: The new `SemWords` are components in the RDF language, -which is described further in @sec-rdf +which is described further in @sec-rdf; either an angle-bracketed `Uri` or a `Curie`. Each component has an optional prefix to denote whether it is an RDF subject, predicate or object. @@ -254,24 +254,36 @@ Syntax of `SemWords`, `SemWord`, `Curie` and `SEMPREFIX`. ::: -## Expectations of processors +## Suggestions for processors -Parsing should be human-friendly, -in the spirit of Markdown -(see @sec-spirit). -This may translate to the annotations being dropped, -unlike Markdown in general but like link definition blocks. +The purpose of these analyses is parsing, +as covered in the follwing chapters. +To conclude follows some general suggestions +for parsing the Markdown extension Semantic Markdown. -For a Markdown parser to cover the Markdown extension Semantic Markdown, -it needs to cover the existing extension AnnotatedWords, -extended to include `Uri` and `Curie`, -and it needs to cover AnnotatedWords not only immediately after Words, -but also as leading or trailing Words for a block. +For a parser of existing Markdown to be extended +to cover the Markdown extension Semantic Markdown, +it needs to cover the existing extension `AnnotatedWords`, +extended to contain `Uri` and `Curie`, +and `AnnotatedWords` should be permitted not only immediately after Words, +but also as initial or final `Words` in a block. +Additionally, the new block type `PrefixDefinition` needs to be covered, +similar to `LinkDefinition` but a simpler structure +with `Curie` as the initial element. -Additionally, a new block type needs to be covered, -similar to LinkDefinition but a simpler structure -with a `Curie` as initial element. +Parsing of Semantic Markdown should be human-friendly, +in the spirit of Markdown +(see @sec-spirit). +For properly matched annotations, +this translates to the markup being removed from content, +similar to the removal of `LinkTarget` inlines and `LinkDefinition` blocks +in core Markdown, +and non-semantic `AnnotatedWords` in some dialects. +Non-matched data should be preserved, treated as content. -These new Word and Block syntaxes should be prioritized, -as the `Uri` and `Curie` patterns are unlikely to collide -with existing Markdown or non-markup plain text. +These extended or new `Word` and `Block` syntaxes -- +`AnnotatedWords` and `PrefixDefinition` -- +should be safe to parse prioritized, +because the majorly involved `Curie` pattern should not collide +with any existing Markdown, +and is unlikely to appear in natural language text. |
