From 2797521289993b928ded83a93d79cf461ed379bc Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 24 Mar 2014 12:45:20 +0000 Subject: [PATCH] Highlighting trailing whitespace in Python and nanorc files. Patches by Mike Frysinger. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4670 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 2 ++ doc/syntax/nanorc.nanorc | 2 ++ doc/syntax/python.nanorc | 3 +++ 3 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index d2f1b48d..0fb6e2d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * doc/syntax/gentoo.nanorc - Match more files, add a trailing whitespace check, and EAPI=5 updates. Patch by Mike Frysinger. * doc/syntax/javascript.nanorc - New file, by Mike Frysinger. + * doc/syntax/{nanorc,python}.nanorc - Highlight trailing + whitespace. Patches by Mike Frysinger . 2014-03-23 Benno Schulenberg * src/rcfile.c (parse_keybinding, parse_unbinding) - Improve a diff --git a/doc/syntax/nanorc.nanorc b/doc/syntax/nanorc.nanorc index 74829e77..04b3f8dc 100644 --- a/doc/syntax/nanorc.nanorc +++ b/doc/syntax/nanorc.nanorc @@ -17,3 +17,5 @@ icolor brightmagenta ""(\\.|[^"])*"" ## Comments icolor brightblue "^[[:space:]]*#.*$" icolor cyan "^[[:space:]]*##.*$" +## Trailing whitespace +color ,green "[[:space:]]+$" diff --git a/doc/syntax/python.nanorc b/doc/syntax/python.nanorc index c24877bd..d329e618 100644 --- a/doc/syntax/python.nanorc +++ b/doc/syntax/python.nanorc @@ -9,3 +9,6 @@ color brightgreen "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" color brightgreen start="\"\"\"[^"]" end="\"\"\"" color brightgreen start="\'\'\'[^']" end="\'\'\'" color brightred "#.*$" + +## Trailing whitespace +color ,green "[[:space:]]+$" -- 2.39.5