zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.47k stars 1.16k forks source link

Fix Makefile syntax matching := and : as targets #3114

Closed petabyt closed 2 months ago

petabyt commented 6 months ago

Before and after: Screenshot at 2024-01-13 01-15-53 Screenshot at 2024-01-13 01-16-06

Andriamanitra commented 6 months ago

This change would cause recipes like a:b (without space) to get highlighted wrong. I would argue in your example VCAM_CORE should be highlighted as an identifier. Maybe the pattern for identifier should instead be changed to something like this?

- identifier: "^[A-Za-z0-9_./-]+"

(I'm unsure which special characters should be allowed though)

petabyt commented 6 months ago

That's not a bad idea, also would need to recognize wildcard %.o targets:

- identifier: "^[%A-Za-z0-9_./-]+"