]> git.wh0rd.org Git - nano.git/commitdiff
Using a character class instead of a literal tab and space.
authorBenno Schulenberg <bensberg@justemail.net>
Sun, 7 Feb 2016 13:14:23 +0000 (13:14 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Sun, 7 Feb 2016 13:14:23 +0000 (13:14 +0000)
The change was inspired by David Niklas.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5618 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
doc/syntax/c.nanorc

index bcffb86c2d46bd3d5bc32ea74f5dd19f7f54e7c9..dfa0c527008806b676441265e57b7081e219b147 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
        * src/files.c (write_file): Avoid a pointless lstat() when not writing
        to a temp file, and in the bargain elide two variables.
        * src/files.c (write_file): Elide an unneeded 'if'.
+       * doc/syntax/c.nanorc: Use a character class instead of a literal tab
+       and space.  The change was inspired by David Niklas.
 
 2016-02-06  Benno Schulenberg  <bensberg@justemail.net>
        * src/files.c (write_file): Remove the --nofollow option that hasn't
index 7aa9e017f7d0b3b9f88ca1b8ae36995c673b10cb..ef156ab4670505b35d5cc86993818772bbceaf35 100644 (file)
@@ -18,7 +18,7 @@ color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidd
 
 # Strings.  In general you will want your strings and comments to come last,
 # because highlighting rules are applied in the order they are read in.
-color brightyellow "<[^=       ]*>" ""(\\.|[^"])*""
+color brightyellow ""([^"]|\\")*"" "<[^[:blank:]=]*>"
 # Multiline strings.  This regex is VERY resource intensive,
 # and sometimes colours things that shouldn't be coloured.
 ###color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
@@ -28,7 +28,7 @@ color brightblue "//.*"
 color brightblue start="/\*" end="\*/"
 
 # Reminders.
-color ,yellow "(FIXME|TODO|XXX)"
+color ,yellow "\<(FIXME|TODO|XXX)\>"
 
 # Trailing whitespace.
 color ,green "[[:space:]]+$"