When parsing regexp parameters for preg_split-like
functions in PHP, syntax highlighting become incorrect
for tokens following regexp.
See attached test file.
Denis, are you sure the attached RE syntax is correct?
It has escaped bracket, which breaks all highlighting.
If you change it to
$tokens = preg_split('/((?<!\\)[&?!])/', $query, -1,
PREG_SPLIT_DELIM_CAPTURE);
(two slashes instead three) everythins becomes ok.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found this code in PEAR::DB package, it contains rather
good-quality code, so I doubt it's a bug. You can look into
the code I've mentioned at http://cvs.php.net/co.php/pear/DB/DB/common.php?r=1.103,
line 780.
I'm not regexp-guru, but this code works...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Testcase
Logged In: YES
user_id=313042
Denis, are you sure the attached RE syntax is correct?
It has escaped bracket, which breaks all highlighting.
If you change it to
$tokens = preg_split('/((?<!\\)[&?!])/', $query, -1,
PREG_SPLIT_DELIM_CAPTURE);
(two slashes instead three) everythins becomes ok.
Logged In: YES
user_id=951610
I found this code in PEAR::DB package, it contains rather
good-quality code, so I doubt it's a bug. You can look into
the code I've mentioned at
http://cvs.php.net/co.php/pear/DB/DB/common.php?r=1.103,
line 780.
I'm not regexp-guru, but this code works...
Logged In: YES
user_id=313042
fixed. available since eclipsecolorer 0.7.1