nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] ruby syntax highlighting patterns


From: John M. Gabriele
Subject: Re: [Nano-devel] ruby syntax highlighting patterns
Date: Mon, 22 May 2006 09:18:07 -0700 (PDT)

--- David Lawrence Ramsey <address@hidden> wrote:
> [snip]
>  I've done a
> little research on Ruby and tweaked the regexes to simplify them when
> possible.  Do the attached regexes still work as expected?

Here's some common-looking Ruby snippets which don't highlight
correctly with those patterns:

title.gsub( /"/, "&quot;" )

# Only works with one (and only one) letter appended. Regexes
# can have more than one trailing modifier letter.
some_regex = %r{^abc$}

# Not sure why this one doesn't work:
CodeEscapeRegexp = %r{( \* | _ | \{ | \} | \[ | \] | \\ )}x

foo = lambda {|char| "&#%03d;" % char}

return %{<a href="%s">%s</a>} % [ rval, rval.sub(/.+?:/, '') ]
text += %{>#{link}</a>}



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

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