Skip to content

Force all syntax regex to ends with $#411

Open
davidhcefx wants to merge 1 commit intoscopatz:masterfrom
davidhcefx:fix-regex
Open

Force all syntax regex to ends with $#411
davidhcefx wants to merge 1 commit intoscopatz:masterfrom
davidhcefx:fix-regex

Conversation

@davidhcefx
Copy link
Copy Markdown
Contributor

@davidhcefx davidhcefx commented Apr 13, 2023

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!

- Lots of syntax regex are poorly written and did not ends with a '$',
   which caused them competing with other regex rules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant