Width and height argtypes, kdesc --argtypes from ref/, txt @define/@left_right/@columns, kdiag --check value validation (from dev d6993110e9b3)

Also: the klammertext argtype (descriptions kept as source), txt table
wrapping and :hpos/:offset, @c between ‹ ›, txt section headings, the
ktext newline-only trim, capitalize(), and the argtype test suite.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
ackandClaude Fable 5.1 committed 2026-09-16 16:59:49 +02:00
1 parent 9b0d0d7897
commit 0ead40f272
39 files changed
+734 -158

No files matched your search

+12
View File
@@ -349,6 +349,18 @@ class Code_fragment(klammer_base.Klammer_base):
def tex(self):
return f"{{\\tt {tex_line(self.code_text.strip())}}}"
def txt(self):
# Plain text has no face to switch to: the fragment is its own text.
# As in html_line/tex_line, the Klammertext specials are quoted for
# the @eval read-back (a bare "@" in the result would be a klammer
# without a beginning) and the typographically active characters
# hidden, so a "--" in code stays two hyphens.
result = klammer_base.hide_typographic(quote_specials(self.code_text.strip()))
# Surround code symbols with ‹ and ›, though there are conflicts in Swiss
# German, Italian and some Scandinavian languages. Should be clear in
# context, though.
result = "\u2039" + result + "\u203A"
return result
def extract_marked_region(src, marker, filename):
"""The region of `src` between two lines that are exactly "//<marker>".