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

+10 -3
View File
@@ -177,6 +177,14 @@ void show_unicode_examples()
std::cout << "\n" << M.apply(text_target()) << "\n\n";
}
void show_argtype_definitions()
{
Machine M;
M.read(M.m_state.value("KLAMMERTEXT_HOME") + "/ref/ref.k");
M.read_string("@argtype_definitions@");
std::cout << "\n" << M.apply(text_target()) << "\n\n";
}
int main(int argc, char* argv[])
{
try {
@@ -224,10 +232,9 @@ int main(int argc, char* argv[])
show_unicode_examples();
}
if (p("argtypes")) {
Argtype_registry argtypes;
std::cout << boldblack << "\nStandard klammer argument types\n" << black;
std::cout << argtypes.describe() << "\n";
show_argtype_definitions();
}
if (args.given("katoms")) {
+6 -1
View File
@@ -70,7 +70,12 @@ int main(int argc, char* argv[])
M.read(fs::path(p));
}
std::string result = trim(M.apply(target));
// Trim NEWLINES only, as Machine::apply itself does: a leading space
// is content under txt -- the indent of a block that opens the
// document (a table, a definition list) -- and trim() took it off
// the first line alone, every other line keeping its indent
// (TODO #60, 2026-09-13).
std::string result = trim_char(M.apply(target), '\n');
if (display_only && !result.empty()) {
std::cout << result << "\n";
} else if (!result.empty()) {