I have the following
syn match specialNumber /1/ contained
syn match normalNumber /\d/ contained
syn match line /^\d$/ contains=specialNumber,normalNumber
hi def link specialNumber Special
hi def link normalNumber Normal
I expect this to highlight a line with 1
as Special
, and a line with any other digit with Normal
. But this is not the case. A line with 1
is always highlighted with Normal
.
What can I do to make the code match my expectation?