edoc: prevent rogue punctuation highlights
Punctuation highlights would show up outside of where they
were valid, for example using parentheses in some text. This
change prevents that by gating the captures to being under
the named nodes in which they are valid.
commit7cf88f2bacb92e1054294137cc4d82792f4b60a4
authorMichael Davis <mcarsondavis@gmail.com>
dateWed 22 Jun 2022, 08:57 (4 years ago)
parent78c944e
runtime/queries/edoc/highlights.scm+3−3
@@ -39,9 +39,9 @@
3939; could be @constant.numeric.integer but this looks similar to a capture
4040(arity) @operator
4141
42−[":" "/"] @operator
43−["(" ")"] @punctuation.delimiter
44−["{" "}"] @function.macro
42+(expression [":" "/"] @operator)
43+(expression ["(" ")"] @punctuation.delimiter)
44+(macro ["{" "}"] @function.macro)
4545
4646[
4747 (quote_marker)