Files
rose-ash/sx/sx/layouts/nav-children.sx
giles 4f02f82f4e HS parser: fix number+comparison keyword collision, eval-hs uses hs-compile
Parser: skip unit suffix when next ident is a comparison keyword
(starts, ends, contains, matches, is, does, in, precedes, follows).
Fixes "123 starts with '12'" returning "123starts" instead of true.

eval-hs: use hs-compile directly instead of hs-to-sx-from-source with
"return " prefix, which was causing the parser to consume the comparison
as a string suffix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 11:29:01 +00:00

22 lines
612 B
Plaintext

(defcomp
(&key items)
:affinity :server
(div
(~tw :tokens "max-w-3xl mx-auto px-4 py-3")
(div
(~tw :tokens "flex flex-wrap justify-center gap-2")
(map
(fn
(item)
(a
:href (get item "href")
:sx-get (get item "href")
:sx-target "#sx-content"
:sx-select "#sx-content"
:sx-swap "innerHTML"
:sx-push-url "true"
(~tw
:tokens "px-3 py-1.5 rounded border transition-colors text-violet-700 text-sm border-violet-200")
(get item "label")))
items))))