When naming a variable with new at the start of the variable name (ex: newAngle), it highlights new separately from the rest of the variable (highlights new one color, then highlights Angle another color)
Sample Code to Reproduce
(Sample code is from the haxeflixel.com documentation, the hosted documentation is using a bit of custom highlighting, but it's going to move to highlightjs, which you can test on dev.haxeflixel.com)
var newAngle:Float = 0;
if (up)
{
newAngle = -90;
if (left)
newAngle -= 45;
else if (right)
newAngle += 45;
}
else if (down)
{
newAngle = 90;
if (left)
newAngle += 45;
else if (right)
newAngle -= 45;
}
else if (left)
newAngle = 180;
else if (right)
newAngle = 0;
Expected behavior
Usually we'd want new to be highlighted differently (ex: creating a new variable state = new FlxState()), but when it's used as a variable, it should be highlighted as a variable rather than whatever the current implementation is for the new keyword.
Additional context
This error can be easily tested from the highlightjs online demo with nearly any theme: https://highlightjs.org/demo
Describe the issue
When naming a variable with
new
at the start of the variable name (ex:newAngle
), it highlightsnew
separately from the rest of the variable (highlightsnew
one color, then highlightsAngle
another color)Which language seems to have the issue? Haxe
Are you using
highlight
orhighlightAuto
?I believe I am using
highlight
/highlightAll
Sample Code to Reproduce (Sample code is from the haxeflixel.com documentation, the hosted documentation is using a bit of custom highlighting, but it's going to move to highlightjs, which you can test on dev.haxeflixel.com)
Expected behavior
Usually we'd want
new
to be highlighted differently (ex: creating a new variablestate = new FlxState()
), but when it's used as a variable, it should be highlighted as a variable rather than whatever the current implementation is for thenew
keyword.Additional context This error can be easily tested from the highlightjs online demo with nearly any theme: https://highlightjs.org/demo