nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit bdf1a9d4e73520c11c5d31ef6ff3161f5989b5e3
parent 5c399dfc6e60a0e869a2306d401ccfe85400c84f
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 19 Aug 2019 17:00:11 +0200

syntax: perl: avoid upsetting older glibcs with crafty range expression

The regcomp() function from glibc-2.27 (and older) considers the
bracket expression ['-.] to be invalid -- mistakenly.  Avoid using
any range expression in the relevant regex and instead enumerate
all acceptable characters.

This avoids https://savannah.gnu.org/bugs/?56766.

Diffstat:
Msyntax/perl.nanorc | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/syntax/perl.nanorc b/syntax/perl.nanorc @@ -11,7 +11,7 @@ color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne # Variable names. color cyan "[$%&@]([A-Za-z_][0-9A-Za-z_]*|\^[][A-Z?\^_]|[0-9]+)\>" color cyan "[$%&@]\{(\^?[A-Za-z_][0-9A-Za-z_]*|\^[][?\^][0-9]+)\}" -color cyan "[$%&@]([][!"#'-.:-?`|~]|\{[][!-/:-@\`|~]\})|\$[$%&@]" +color cyan "[$%&@]([][!"#'()*+,.:;<=>?`|~-]|\{[][!-/:-@\`|~]\})|\$[$%&@]" color cyan "(^|[[:space:]])[$%@][/\]" color yellow "".*"|qq\|.*\|"