nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] [PATCH 1/2] rcfile: allow a syntax name to be unquoted


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH 1/2] rcfile: allow a syntax name to be unquoted
Date: Thu, 8 Feb 2018 12:23:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0


Op 08-02-18 om 00:23 schreef Brand Huntsman:
the code doesn't restrict syntax names to only alpha characters (and
shouldn't), so why does nanorc only highlight alpha characters?

Ah.  Hadn't thought of that.  Would alnum plus the slash be enough?

I was using this before to highlight the quoted syntax names: color cyan "^[[:space:]]*syntax[[:space:]]+\"[^ ]+\""

And now use this (with your patch): color cyan "^[[:space:]]*syntax[[:space:]]+(\"[^ ]+\"|[^ ]+)"

Aren't the backslashes superfluous?  And shouldn't the latter part
include the double quote in its exclusion for the preceding part to
be effective?

  [^"      ]+

Benno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]