From 75d54ad0c5d9bdcb02e9934401f1a23bc0645de7 Mon Sep 17 00:00:00 2001
From: Jonas Smedegaard <dr@jones.dk>
Date: Mon, 26 May 2025 10:18:42 +0200
Subject: add syntax PrefixDefinition; improve text on Markdown

---
 _markdown.qmd | 50 +++++++++++++++++++++++++++++++-------------------
 1 file changed, 31 insertions(+), 19 deletions(-)

(limited to '_markdown.qmd')

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,
+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 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.
+
+Parsing of Semantic Markdown 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.
-
-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.
-
-Additionally, a new block type needs to be covered,
-similar to LinkDefinition but a simpler structure
-with a `Curie` as initial element.
-
-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.
+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 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.
-- 
cgit v1.2.3

