Commit Graph

9 Commits (master)

Author SHA1 Message Date
Benno Schulenberg 544351f3be syntaxes: replace [[:space:]] with [[:blank:]] to exclude carriage return
In many places a carriage return is not valid whitespace and should
thus not be colored as such.  In some of these places a vertical tab
or form feed is maybe valid whitespace, but it would be ugly or even
wrong to color them because they are not part of the subsequent
comment or keyword.

This fixes https://savannah.gnu.org/bugs/?60456.
2021-04-27 11:18:41 +02:00
Benno Schulenberg fea5d7c612 syntaxes: uniformize the initial comment 2020-04-20 19:21:56 +02:00
Benno Schulenberg 8492de53f7 syntax: makefile: color all keywords that GNU make recognizes
Plus one that automake recognizes: if.  Color them only at the start
of a line.  Also color all possible assignment sequences (surrounded
by spaces to not color the ones in shell fragments), and add some
comments.
2018-05-30 11:29:08 +02:00
Cristian Caloghera 22663f8a2e syntax: makefile: recognize also an all-lowercase makefile name
Recognize not just "Makefile" but also "makefile" and "GNUmakefile".
And recognize these only when they are the full filenames, not when
they are the tail part of a longer name.

Signed-off-by: Cristian Caloghera <cristi.caloghera@gmail.com>
2018-05-22 20:41:43 +02:00
Benno Schulenberg cdd637d69f syntaxes: condense and/or correct some extension regexes 2018-05-18 20:40:08 +02:00
Benno Schulenberg 3e1fc6385b syntaxes: remove quotes from each syntax name, and color it differently
The different color will make the name stand out, as it should, instead
of looking the same as all the regex strings.
2018-02-14 17:36:50 +01:00
Benno Schulenberg bacb0f717d syntax: adjust the magic strings for the changes since file-5.10
Since file-5.10 (end of 2011), libmagic identifies a C file in most
cases as "C source" instead of as "C program".  Nano's magic strings
for some other files didn't match any more what file-5.32 currently
produces, either.  So, they have been adjusted, new ones added, and
old ones deleted.

This fixes https://savannah.gnu.org/bugs/?52445.
2017-11-19 11:24:30 +01:00
Benno Schulenberg 7e09f2c64a syntax: makefile: color comments only at start of line or after whitespace 2017-05-09 17:37:05 +02:00
Benno Schulenberg b0ef2e2803 build: move the syntax files out of the doc/ directory
They are not documentation, they are functional elements of nano.
2016-12-30 22:05:01 +01:00