Verbatim-safe typography, ^-punctuation quoting, full-range ^UUUU^, polyglot html

Typographic transforms (---, quote pairs, ~) no longer touch verbatim
text: @c/@code/@source_listing content and ^'...'^ spans show exactly the
characters written. "^" before any punctuation character quotes it in
every target (the apostrophe excepted: ^' opens a literal span), with the
new :resolve option on @@@target declaring per-target renderings. The
^UUUU^ code-point form accepts 4-6 hex digits, the full Unicode range.
The html output and transform spellings are polyglot (XML-valid), in
preparation for an EPUB target. New suites: transform_test, character_test
(engine), typography_test (SKS).

(from dev 07ce5ea86a0a)
This commit is contained in:
2026-08-23 20:48:26 +02:00
parent d982c0d6cc
commit 37b6ba1c4f
77 changed files with 1665 additions and 1608 deletions

View File

@@ -8,7 +8,7 @@
"whitespace operators left unscoped), the three @-tiers — application",
"(@), definition (@@), system (@@@) — each as an opening (@name, one",
"unit) or a close (name@, bare @), ^-escapes (consumed, unscoped),",
"and verbatim @code ... code@ interiors.",
"and verbatim @code ... code@ / @c ... c@ interiors.",
"",
"How open vs. close is decided (the same rule as every integration):",
"a delimiter whose NAME follows the @-run is an OPENING; a bare",
@@ -19,7 +19,7 @@
"in doc/edit/shared/klammertext_edit.py. A static grammar cannot",
"read it: to add a literal klammer 'foo', copy the @code begin/end",
"rule below with code -> foo (and mirror it in the Emacs, Sublime,",
"and Vim artifacts; all are seeded with just 'code').",
"and Vim artifacts; all are seeded with 'code' and 'c').",
"",
"Delimiter matching, indentation, alignment, and diagnostics are not",
"tokenizer concerns — they come from the Klammertext language server",
@@ -77,6 +77,16 @@
"0": { "name": "entity.name.function.end.klammertext" }
}
},
{
"begin": "@c(?![A-Za-z0-9_])",
"beginCaptures": {
"0": { "name": "entity.name.function.begin.klammertext" }
},
"end": "(?<![A-Za-z0-9_])c@",
"endCaptures": {
"0": { "name": "entity.name.function.end.klammertext" }
}
},
{
"match": "@@@[A-Za-z0-9_]+",
"name": "keyword.control.begin.klammertext"