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:
@@ -183,6 +183,33 @@ check_eq "25. a real literal klammer still works after a comment naming it" \
|
||||
|
||||
rm -f "$ERR"
|
||||
|
||||
echo
|
||||
echo "-- 26-29: a general body escapes only its OWN literal text, never a --"
|
||||
echo "-- substituted argument value (ordering defect fixed 2026-08-19) --"
|
||||
# An argument value is writer text already escaped at the top level (KTESC
|
||||
# markers, idempotent) PLUS final target markup from klammers the writer
|
||||
# nested in the argument. apply_klammer used to substitute values first and
|
||||
# escape the general body after, so that markup was swept as if it were the
|
||||
# body's literal text: "@sig @b Andy @ @" emitted BSLtextbf{Andy}. The escape
|
||||
# now runs before substitution. BOLD is a target-specific nested klammer
|
||||
# (case 7/9 pattern) whose raw output must survive untouched.
|
||||
BOLD='@@b.k s : d @@ @@b.t :: \textbf{*s*} @@'
|
||||
check_eq "26. substituted klammer output NOT re-escaped" \
|
||||
'Sincerely, \textbf{Andy}' --klammersets none -t t \
|
||||
-s "$T $BOLD @@sig name : Sincerely, *name* @@ @sig @b Andy @ @"
|
||||
check_eq "27. ... while the body's own literal & still IS escaped" \
|
||||
'Fish AMP \textbf{Chips}' --klammersets none -t t \
|
||||
-s "$T $BOLD @@sig2 name : Fish & *name* @@ @sig2 @b Chips @ @"
|
||||
check_eq "28. writer specials in the argument still escaped (markers)" \
|
||||
'Sincerely, a AMP b' --klammersets none -t t \
|
||||
-s "$T @@sig name : Sincerely, *name* @@ @sig a & b @"
|
||||
# The variable shares one text katom with literal specials on both sides:
|
||||
# the katom's literal "_"s must be escaped and the value spliced in raw
|
||||
# afterwards -- the ordering this section exists to pin.
|
||||
check_eq "29. mixed katom: literal specials escaped, spliced value raw" \
|
||||
'AUND\textbf{Q}UNDB' --klammersets none -t t \
|
||||
-s "$T $BOLD @@w s : A_*s*_B @@ @w @b Q @ @"
|
||||
|
||||
echo
|
||||
echo "============================================"
|
||||
echo "Results: ${green}$PASS passed${reset}, ${red}$FAIL failed${reset}"
|
||||
|
||||
Reference in New Issue
Block a user