Sublime Forum

Syntax definition problem (bug maybe)

#1

Hello,

Can someone give me some info about syntax definition logic.
I’m have next problem

Next file is to highlight

nav
  a

and next rules under patterns

{
    "name": "entity.name.tag.z",
    "match": "\\b(nav|a)\\b"
},
{
    "name": "support.type.property-name.z",
    "match": "\\s*[A-z_-]+"
}

Assumed so both ‘nav’ anv ‘a’ be highlighted by first rule, but for some reason ‘nav’ goes fine but ‘a’ get highlight from 2nd rule,
As far as we non have 2nd rule both highlighted by first rule as assumed.
So it strange, does once rule #1 works it non get override by 2nd?
Cos region excluded as written in docs. Or there is some non normal rules order / precedence?

0 Likes