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:
11
tst/editor/indent_literal_c.kt
Normal file
11
tst/editor/indent_literal_c.kt
Normal 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
|
||||
@
|
||||
11
tst/editor/indent_literal_c_expected.kt
Normal file
11
tst/editor/indent_literal_c_expected.kt
Normal 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
|
||||
@
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user