1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-03-17 20:58:08 +02:00

cfengine3: Removed rule attempting to highlight variable names

This rule is problematic for 2 reasons:
* The regex is buggy, it doesn't work for more advanced cases
  when there are other attributes before slist, or string, or
  whatever the type is.
* In the context of CFEngine policy language, it's just a bit
  confusing. Yes, they are variable names, but they are also
  quoted strings, and what we call promisers. It looks better,
  more consistent and less confusing if they are highlighted
  in the same way as other strings and promisers.

Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
This commit is contained in:
Ole Herman Schumacher Elgesem 2022-08-12 16:41:55 +02:00 committed by Alec Thomas
parent 111921a080
commit 6538430570

View File

@ -70,18 +70,6 @@
<token type="NameFunction"/>
</bygroups>
</rule>
<rule pattern="(&#34;)([^&#34;]+)(&#34;)(\s+)(string|slist|int|real)(\s*)(=&gt;)(\s*)">
<bygroups>
<token type="Punctuation"/>
<token type="NameVariable"/>
<token type="Punctuation"/>
<token type="Text"/>
<token type="KeywordType"/>
<token type="Text"/>
<token type="Operator"/>
<token type="Text"/>
</bygroups>
</rule>
<rule pattern="(\S+)(\s*)(=&gt;)(\s*)">
<bygroups>
<token type="KeywordReserved"/>