From b8d92feb6275e303de3f9fdfe3700e1fd47c66d8 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Thu, 30 Mar 2006 18:12:50 +0000 Subject: [PATCH] in nanorc.sample, replace instances of \" with ", since quotes inside string parameters don't need to be escaped with backslashes git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3337 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 2 ++ doc/nanorc.sample | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 95d7caed..4a4ee31b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ CVS code - - doc/nanorc.sample: - Tweak the "c-file" regex for characters to accept '"' again, as it's apparently valid. (DLR) + - Replace instances of \" with ", since quotes inside string + parameters don't need to be escaped with backslashes. (DLR) GNU nano 1.3.11 - 2006.03.30 - General: diff --git a/doc/nanorc.sample b/doc/nanorc.sample index 3db3f921..cc8b65a1 100644 --- a/doc/nanorc.sample +++ b/doc/nanorc.sample @@ -208,10 +208,10 @@ ## because syntax highlighting rules will be applied in the order they ## are read in. ## -# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*"" +# color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" ## ## This string is VERY resource intensive! -# color brightyellow start=""(\\.|[^\"])*\\[[:space:]]*$" end="^(\\.|[^\"])*"" +# color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" ## ## And we want to have some nice comment highlighting too # color brightblue "//.*" @@ -251,7 +251,7 @@ ## Requests # color brightgreen "^\.[[:space:]]*[^[[:space:]]]*" ## Comments -# color yellow "^\.\\\".*$" +# color yellow "^\.\\".*$" ## Strings # color green "(\\|\\\\)\*." # color green "(\\|\\\\)\*\(.." @@ -280,7 +280,7 @@ # color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" # color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>" # color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>" -# color red ""[^\"]*"" +# color red ""[^"]*"" # color yellow "\<(true|false|null)\>" # color blue "//.*" # color blue start="/\*" end="\*/" @@ -318,8 +318,8 @@ # icolor brightred "^[[:space:]]*[._A-Z0-9]*:" # color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)" ## Highlight strings (note: VERY resource intensive) -# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*"" -# color brightyellow start=""(\\.|[^\"])*\\[[:space:]]*$" end="^(\\.|[^\"])*"" +# color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" +# color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" ## Highlight comments # color brightblue "//.*" # color brightblue start="/\*" end="\*/" @@ -335,7 +335,7 @@ # color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>" # icolor brightred "\$\{?[_A-Z0-9]+\}?" # color yellow "#.*$" -# color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'" +# color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" ## Here is an example for your .nanorc ## @@ -349,6 +349,6 @@ # icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" # icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)=" ## strings -# icolor white "\"(\\.|[^\"])*\"" +# icolor white ""(\\.|[^"])*"" ## comments # icolor blue "^[[:space:]]*#.*$" -- 2.39.5