Lots of syntax regex are poorly written and did not ends with a $, which caused them competing with other regex rules.
As a real example: I have a patch file named 0001-some-commit-that-enhanced-a-bashrc-file.patch. Since it is ending with a .patch, one would expects it be highlighted using patch.nanorc. However, it turned out that sh.nanorc highlighted it (terribly, of course), just because of its poorly written regex!
Description
Lots of syntax regex are poorly written and did not ends with a
$
, which caused them competing with other regex rules.As a real example: I have a patch file named
0001-some-commit-that-enhanced-a-bashrc-file.patch
. Since it is ending with a.patch
, one would expects it be highlighted usingpatch.nanorc
. However, it turned out thatsh.nanorc
highlighted it (terribly, of course), just because of its poorly written regex!