[go: up one dir, main page]

Menu

#360 php syntax highlighting of variables fails in string constants

v4.4
closed-fixed
None
v4.3
5
2017-09-26
2016-11-06
Josip Rodin
No

Hi,

Daniel Migowski originally reported this in http://bugs.debian.org/488118

Syntax Highlighting in php mode fails slightly within String constants for
variables containing numbers. They are highlighted correctly our of string
constants, but within they are just rendered up to the containing number.

http://www.php.net/language.variables indicates that the regular expression
for variable names is
[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*
so we need to add a bit more code in order to match 0-9 as part of variable
names (but not the first character)...

The issues seems to be with the var_indqstring variable inside php.jsf

The code to reproduce is trivial:

<?

$var1d = "$var2d";

The characters 2 and d are not recognized as part of the variable name

Discussion

  • Joe Allen

    Joe Allen - 2016-12-08

    This is fixed in Mercurial.

     
  • John J. Jordan

    John J. Jordan - 2017-09-26
    • status: open --> closed-fixed
    • assigned_to: Joe Allen
    • Group: Unknown --> v4.4
     

Log in to post a comment.