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

@@ -0,0 +1,11 @@
@document :text
@i before @c @right c@ after @ @x@
@note
inside the note
@
@c content with basic@ inside c@ and after
@c
kept as-is # not a comment
c@
after everything
@

View File

@@ -0,0 +1,11 @@
@document :text
@i before @c @right c@ after @ @x@
@note
inside the note
@
@c content with basic@ inside c@ and after
@c
kept as-is # not a comment
c@
after everything
@

View File

@@ -81,6 +81,22 @@ call s:Check('abbreviated @name-', s:Syn(9, 1) ==# 'klammertextAppOpen'
\ && s:Syn(9, 6) ==# '' && s:Syn(9, 7) ==# '', s:Syn(9, 6))
call s:Check('file marker ##', s:Syn(10, 1) ==# 'klammertextMarker', s:Syn(10, 1))
call s:Check('## removes to EOF', s:Syn(11, 3) ==# 'klammertextRemovedFile', s:Syn(11, 3))
" @c is the single-letter literal klammer (inline @code, 2026-08-16). A
" fresh buffer: the ## in the buffer above removes to EOF. The traps a
" single-letter name adds: a word ending in c ("basic@") must not close the
" region, and "@caption" must not open one.
enew!
call setline(1, [
\ '@c y @ basic@ z c@ tail',
\ '@caption arg @'])
set filetype=klammertext
call s:Check('c verbatim open @c', s:Syn(1, 1) ==# 'klammertextAppOpen', s:Syn(1, 1))
call s:Check('c interior @ verbatim', s:Syn(1, 6) ==# 'klammertextVerbatim', s:Syn(1, 6))
call s:Check('basic@ does not close @c', s:Syn(1, 13) ==# 'klammertextVerbatim', s:Syn(1, 13))
call s:Check('real close c@', s:Syn(1, 17) ==# 'klammertextAppClose', s:Syn(1, 17))
call s:Check('text after c@ plain', s:Syn(1, 20) ==# '', s:Syn(1, 20))
call s:Check('@caption opens @caption, not @c', s:Syn(2, 1) ==# 'klammertextAppOpen', s:Syn(2, 1))
else
call add(s:results, 'SKIP syntax checks (this Vim lacks +syntax)')
endif