HS: fix remove [@attr] — consume bracket-close instead of match-kw "]"
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 49s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 49s
match-kw only matches tokens of type "keyword", but ] tokenizes as bracket-close. This left the ] unconsumed after remove [@foo], causing the attribute to never be removed. Use (when (= (tp-type) "bracket-close") (adv!)) matching the same pattern parse-add-cmd uses for [attr=val]. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1227,7 +1227,7 @@
|
||||
(= (tp-type) "attr")
|
||||
(let
|
||||
((attr-name (get (adv!) "value")))
|
||||
(match-kw "]")
|
||||
(when (= (tp-type) "bracket-close") (adv!))
|
||||
(let
|
||||
((tgt (if (match-kw "from") (parse-expr) nil)))
|
||||
(list (quote remove-attr) attr-name tgt)))
|
||||
|
||||
Reference in New Issue
Block a user