[go: up one dir, main page]

Menu

#68 Incorrectly parses some PHP regexps

colorer-take5
closed-fixed
HRC codes (39)
5
2005-07-12
2004-12-07
No

When parsing regexp parameters for preg_split-like
functions in PHP, syntax highlighting become incorrect
for tokens following regexp.
See attached test file.

Discussion

  • Denis Malinovsky

    Testcase

     
  • Igor Russkih

    Igor Russkih - 2004-12-07

    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.

     
  • Igor Russkih

    Igor Russkih - 2004-12-07
    • labels: 511420 --> HRC codes
    • assigned_to: nobody --> lomecb
    • status: open --> open-accepted
     
  • Denis Malinovsky

    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...

     
  • Igor Russkih

    Igor Russkih - 2005-07-12
    • status: open-accepted --> closed-fixed
     
  • Igor Russkih

    Igor Russkih - 2005-07-12

    Logged In: YES
    user_id=313042

    fixed. available since eclipsecolorer 0.7.1

     

Log in to post a comment.