From: Lady Date: Sun, 27 Apr 2025 05:21:13 +0000 (-0400) Subject: Drop langtags on offset text but support on paras X-Git-Tag: 0.5.0~3 X-Git-Url: https://git.ladys.computer/LesML/commitdiff_plain/10e5f7f3eed0f44a9bdbf1f7276ab546fbe27dc1?ds=sidebyside Drop langtags on offset text but support on paras Now that language attributes can be arbitrarily added to any inline, a special syntax for them doesn’t make much sense. However, that syntax would be useful on block‐level elements. There isn’t a real technical reason for the explicit `$` end of the language tag, since the following white·space could have been used to end it also, but it makes the syntax a bit more obvious, matches the existing format with the shebangs, and is less likely to conflict with id syntaxes (which might include `@` but probably won’t also end in a `$`). You can still make id’s like `@es$` if you need by explicitly language‐tagging: `¶@es$@en$`. This commit also allows block sigils to not be followed by a space if they are immediately followed by a pilcrow. --- diff --git a/README.markdown b/README.markdown index 11c8c37..1979cd3 100644 --- a/README.markdown +++ b/README.markdown @@ -179,10 +179,12 @@ After this classification, each quoted or unquoted paragraph is further - Otherwise, it is an ordinary paragraph. -Following this sigil (if any, including trailing white·space) there may - be a `¶` followed by zero or more non·white·space characters. +Following this sigil (if any) there may be a `¶` followed by zero or + more non·white·space characters. The characters following the `¶` give the identifier for the paragraph, which is expected to be unique within a document. +This may be suffixed with a language tag beginning with `@` and + terminated with `$`. The remaining characters in a paragraph form its contents. Markup within paragraphs is delimited with·out exception by pairs of @@ -227,8 +229,6 @@ Markup within paragraphs is delimited with·out exception by pairs of - The characters `⸶` and `⸷` indicate names (``). - The characters `⟨` and `⟩` indicate offset text (``). - This may be followed by a `@`, a language tag, and a `$` to provide - the language of the text. - The characters `⦃` and `⦄` indicate keyword highlighting (``). diff --git a/parser.xslt b/parser.xslt index f6b3823..8f80c39 100644 --- a/parser.xslt +++ b/parser.xslt @@ -14,8 +14,8 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one - - + + ]>