diff --git a/lib/hyperscript/parser.sx b/lib/hyperscript/parser.sx index eb8270cf..55dd00d8 100644 --- a/lib/hyperscript/parser.sx +++ b/lib/hyperscript/parser.sx @@ -429,6 +429,8 @@ (let ((name val) (args (parse-call-args))) (cons (quote call) (cons (list (quote ref) name) args))))) + ((= typ "keyword") + (do (adv!) (list (quote ref) val))) (true nil))))) (define parse-poss diff --git a/lib/hyperscript/runtime.sx b/lib/hyperscript/runtime.sx index 4bc59e82..b3284eac 100644 --- a/lib/hyperscript/runtime.sx +++ b/lib/hyperscript/runtime.sx @@ -311,7 +311,9 @@ hs-set-inner-html! (fn (target value) - (do (dom-set-inner-html target value) (hs-boot-subtree! target)))) + (let + ((str-val (if (list? value) (join "" (map (fn (x) (str x)) value)) value))) + (do (dom-set-inner-html target str-val) (hs-boot-subtree! target))))) (define hs-put! (fn diff --git a/shared/static/wasm/sx/hs-parser.sx b/shared/static/wasm/sx/hs-parser.sx index eb8270cf..55dd00d8 100644 --- a/shared/static/wasm/sx/hs-parser.sx +++ b/shared/static/wasm/sx/hs-parser.sx @@ -429,6 +429,8 @@ (let ((name val) (args (parse-call-args))) (cons (quote call) (cons (list (quote ref) name) args))))) + ((= typ "keyword") + (do (adv!) (list (quote ref) val))) (true nil))))) (define parse-poss diff --git a/shared/static/wasm/sx/hs-runtime.sx b/shared/static/wasm/sx/hs-runtime.sx index 4bc59e82..b3284eac 100644 --- a/shared/static/wasm/sx/hs-runtime.sx +++ b/shared/static/wasm/sx/hs-runtime.sx @@ -311,7 +311,9 @@ hs-set-inner-html! (fn (target value) - (do (dom-set-inner-html target value) (hs-boot-subtree! target)))) + (let + ((str-val (if (list? value) (join "" (map (fn (x) (str x)) value)) value))) + (do (dom-set-inner-html target str-val) (hs-boot-subtree! target))))) (define hs-put! (fn