Hi Eric,
Eric Promislow wrote:
> [snip]
> @@ -776,6 +819,7 @@
> - } else if (ch == '/' && preferRE) {
> + } else if (ch == '/' && (preferRE || (firstTokenOnLine(i,
> styler) && strchr("^[./", chNext)))) {
> *or*
> + } else if (ch == '/' && (preferRE || strchr("^[./",
> chNext))) {
>
> I haven't written firstTokenOnLine yet, and am not sure it's completely
> necessary.
> There are about four other characters a regex can start with that cannot
> follow
> a division operator, but the above four are common characters that can
> appear at the start of a regex. I tested the code without a
> firstTokenOnLine
> routine, and couldn't get any false negatives.
Thanks for the quick response. I'll try it out... but that's about all I can
do. Any Ruby coders out there?
> Just to recap, the problem occurs in this context:
>
> def function_name ( args ) # args optional
> /regex/ =~ pattern
> ...
>
> - Eric
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest