HS: fix CSS dict semicolon parsing in add command (+1)
collect-pairs! in parse-add-cmd now skips the semicolon op token
between CSS properties, so add {color: red; font-family: monospace}
compiles to two dom-set-style calls instead of three malformed ones.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1046,6 +1046,9 @@
|
||||
(let
|
||||
((val (if (and (= (tp-type) "ident") (= (tp-val) "$")) (do (adv!) (when (= (tp-type) "brace-open") (adv!)) (if (= (tp-type) "brace-close") (do (adv!) (if (= (tp-type) "brace-open") (do (adv!) (let ((inner (parse-expr))) (when (= (tp-type) "brace-close") (adv!)) inner)) "")) (let ((expr (parse-expr))) (when (= (tp-type) "brace-close") (adv!)) expr))) (get (adv!) "value"))))
|
||||
(set! pairs (cons (list prop val) pairs))
|
||||
(when
|
||||
(and (= (tp-type) "op") (= (tp-val) ";"))
|
||||
(adv!))
|
||||
(collect-pairs!))))))
|
||||
(collect-pairs!)
|
||||
(when (= (tp-type) "brace-close") (adv!))
|
||||
|
||||
@@ -1046,6 +1046,9 @@
|
||||
(let
|
||||
((val (if (and (= (tp-type) "ident") (= (tp-val) "$")) (do (adv!) (when (= (tp-type) "brace-open") (adv!)) (if (= (tp-type) "brace-close") (do (adv!) (if (= (tp-type) "brace-open") (do (adv!) (let ((inner (parse-expr))) (when (= (tp-type) "brace-close") (adv!)) inner)) "")) (let ((expr (parse-expr))) (when (= (tp-type) "brace-close") (adv!)) expr))) (get (adv!) "value"))))
|
||||
(set! pairs (cons (list prop val) pairs))
|
||||
(when
|
||||
(and (= (tp-type) "op") (= (tp-val) ";"))
|
||||
(adv!))
|
||||
(collect-pairs!))))))
|
||||
(collect-pairs!)
|
||||
(when (= (tp-type) "brace-close") (adv!))
|
||||
|
||||
Reference in New Issue
Block a user