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

fix(nix): nix lexor missing '=' operator (#1031)

The nix lexor was missing the '=' operator in the operators rule. This
meant that in some cases (like the first '=' in a code block), it would
return an err instead of the proper highlighting.

Before:

![screenshot](https://github.com/user-attachments/assets/a34dd5e1-ea6b-4898-a8ef-81cf9b9f40fe)
After:

![screenshot](https://github.com/user-attachments/assets/eb59697c-b828-4c33-bb12-19f67432a99d)
This commit is contained in:
FlyingStitchman 2024-12-25 08:37:32 +00:00 committed by GitHub
parent 67f0e3b31d
commit f3ff20b1f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,7 +106,7 @@
</bygroups>
<push state="interpol"/>
</rule>
<rule pattern="(&amp;&amp;|&gt;=|&lt;=|\+\+|-&gt;|!=|\|\||//|==|@|!|\+|\?|&lt;|\.|&gt;|\*)">
<rule pattern="(&amp;&amp;|&gt;=|&lt;=|\+\+|-&gt;|!=|=|\|\||//|==|@|!|\+|\?|&lt;|\.|&gt;|\*)">
<token type="Operator"/>
</rule>
<rule pattern="[;:]">