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

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:
2026-05-05 13:34:22 +00:00
parent 35ace3e74c
commit 297f0603e5

View File

@@ -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)))