From 48696498ef32dbb8ce4a2633e4738cfe702c6e68 Mon Sep 17 00:00:00 2001 From: giles Date: Sun, 1 Mar 2026 14:56:05 +0000 Subject: [PATCH] Wrap multi-expression sx returns in fragments to prevent kwarg truncation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When multiple sx expressions are concatenated and passed as a kwarg value via SxExpr(), the parser only sees the first as the value — the rest become extra args silently dropped by the component. Wrap in (<>) fragments in render_editor_panel() and _page_cards_sx(). Co-Authored-By: Claude Opus 4.6 --- blog/sx/sx_components.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blog/sx/sx_components.py b/blog/sx/sx_components.py index 0678649..c6e96a5 100644 --- a/blog/sx/sx_components.py +++ b/blog/sx/sx_components.py @@ -364,7 +364,7 @@ def _page_cards_sx(ctx: dict) -> str: else: parts.append(sx_call("blog-no-pages")) - return "".join(parts) + return "(<> " + " ".join(parts) + ")" if parts else "" def _page_card_sx(page: dict, ctx: dict) -> str: @@ -1267,7 +1267,7 @@ def render_editor_panel(save_error: str | None = None, is_page: bool = False) -> ) parts.append(sx_call("blog-editor-scripts", js_src=editor_js, init_js=init_js)) - return "".join(parts) + return "(<> " + " ".join(parts) + ")" if parts else "" # ---- New post/page ----