scopatz / nanorc

Improved Nano Syntax Highlighting Files
Other
3k stars 549 forks source link

Force all syntax regex to ends with `$` #411

Open davidhcefx opened 1 year ago

davidhcefx commented 1 year ago

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 using patch.nanorc. However, it turned out that sh.nanorc highlighted it (terribly, of course), just because of its poorly written regex!