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:
1 parent
9b0d0d7897
commit
0ead40f272
39 files changed
+734
-158
No files matched your search
@@ -223,11 +223,11 @@ def hpos_container(element, hpos, offset=None):
|
||||
# coded, and only in html.)
|
||||
styles = []
|
||||
if hpos not in ("left", "center", "right", "none"):
|
||||
length, _, _ = kutil.parse_length("html", hpos, 1)
|
||||
length, _, _ = kutil.parse_width("html", hpos)
|
||||
styles.append(f"margin-left: {length}")
|
||||
hpos = "indent"
|
||||
if offset and offset not in ("0", "0pt") and hpos in ("left", "right", "indent"):
|
||||
length, _, _ = kutil.parse_length("html", offset, 1)
|
||||
length, _, _ = kutil.parse_width("html", offset)
|
||||
side = "right" if hpos == "right" else "left"
|
||||
styles.append(f"padding-{side}: {length}")
|
||||
result = E("div").cls("hpos_" + hpos).body(element)
|
||||
|
||||
Reference in new issue
Block a user