Skip to content

Commit

Permalink
fix(nix): nix lexor missing '=' operator (#1031)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
FlyingStitchman authored Dec 25, 2024
1 parent 67f0e3b commit f3ff20b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lexers/embedded/nix.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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="[;:]">
Expand Down

0 comments on commit f3ff20b

Please sign in to comment.