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

@@ -20,13 +20,13 @@
" character is never read as a delimiter. A run of carets pairs
" left-to-right, reproducing the language's parity rule.
"
" Literal klammers: @code ... code@ — the interior is verbatim (no # or @
" Literal klammers: @code ... code@ and @c ... c@ — the interior is verbatim (no # or @
" interpreted). SYNC: the literal-klammer set's source of truth is
" LITERAL_KLAMMERS in doc/edit/shared/klammertext_edit.py; a static
" syntax file cannot read it, so when you add a literal klammer 'foo',
" copy the klammertextVerbatim region below with code -> foo (and mirror
" it in the Emacs, Sublime, and VS Code artifacts; all are seeded with
" just 'code').
" 'code' and 'c').
"
" How open vs. close is decided (the same rule as every other integration):
" a delimiter whose NAME follows the @-run (@name) is an OPENING; a bare
@@ -76,12 +76,16 @@ syn match klammertextAppOpen /@\@1<!@\w\+/
syn match klammertextAppClose /@\@1<!@\%(\w\|@\)\@!/
syn match klammertextAppClose /@\@1<!\w\+@\%(\w\|@\)\@!/
" --- literal klammer: interior verbatim (seeded default: @code) -----------
" --- literal klammers: interior verbatim (seeded: @code and @c) -----------
" Defined AFTER the @-tier matches: in Vim, when several items match at the
" same position the LAST defined wins, and this region must beat the plain
" klammertextAppOpen match at '@code'. (Sublime's tokenizer picks the FIRST
" listed rule — the opposite convention; don't copy that ordering here.)
syn region klammertextVerbatim matchgroup=klammertextAppOpen start=/@\@1<!@code\%(\w\)\@!/ matchgroup=klammertextAppClose end=/code@/
" @c is the inline form of @code (literal since 2026-08-16). The \w\@1<!
" guard on the close keeps a word ending in c ("basic@") from ending the
" region — essential for a single-letter name.
syn region klammertextVerbatim matchgroup=klammertextAppOpen start=/@\@1<!@c\%(\w\)\@!/ matchgroup=klammertextAppClose end=/\w\@1<!c@/
" --- colors ---------------------------------------------------------------
" The shared palette, dark and light values (see the header). cterm values