Fix page helper results being quoted as string literals in defpage slots
Page helpers return SX source strings from render_to_sx(), but _aser's serialize() was wrapping them in double quotes. In async_eval_slot_to_sx, pass string results through directly since they're already SX source. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -943,6 +943,10 @@ async def async_eval_slot_to_sx(
|
|||||||
return result.source
|
return result.source
|
||||||
if result is None or result is NIL:
|
if result is None or result is NIL:
|
||||||
return ""
|
return ""
|
||||||
|
# Page helpers return SX source strings from render_to_sx() —
|
||||||
|
# pass through directly instead of quoting via serialize().
|
||||||
|
if isinstance(result, str):
|
||||||
|
return result
|
||||||
return serialize(result)
|
return serialize(result)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user