NixOS / nix-mode

An Emacs major mode for editing Nix expressions.
GNU Lesser General Public License v2.1
293 stars 74 forks source link

`''\x` not highlighted correctly in intended string #200

Open andersk opened 4 months ago

andersk commented 4 months ago

In Nix ''\ may be followed by any character, not just n/r/t:

Linefeed, carriage-return and tab characters can be written as ''\n, ''\r, ''\t, and ''\ escapes any other character.

One use case is described at https://github.com/NixOS/nix/issues/1416#issuecomment-335173637.

However, nix-mode only special-cases ''\n, ''\r, ''\t, and incorrectly highlights ''\x as if it ends the string.

(Related: #81, fixed by #157.)