nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] ruby pats


From: David Lawrence Ramsey
Subject: Re: [Nano-devel] ruby pats
Date: Thu, 06 Jul 2006 17:23:17 -0400
User-agent: Thunderbird 1.5.0.4 (X11/20060516)

John M. Gabriele wrote:
> Just noticed that the end part of camelCaseNames were accidentally
> getting highlighted as Constants. So, I changed the Constants pattern
> as follows:

<snip>

>> color brightblue "\<(\$|@|@@)?[A-Z]+[0-9A-Z_a-z]*"
>
> and it seems to be ok, except now, for Constants that start with $, @,
> or @@, those little symbols are (incorrectly) no longer getting
> highlighted as part of the constant... not great, but possibly better
> than before.
>
> It seems like the symbols ($, @, @@) should be getting colored using
> that regex. Why aren't they?

After some experimenting, this appears to work properly (please let me
know if it doesn't; I'll add it to CVS if it does):

color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"

My best guess as to why is that "\<" marks the beginning of a word, and
punctuation isn't treated as part of the word, so the "\<" has to be
after the punctuation.





reply via email to

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