Expressions With Slashes Are Highlighted Incorrectly
First off: I'm not talking about multi line commenting, I don't think. The problem is occurring when there is a space between the / and the * such as draw.arc(x, y, radius, Math.PI
Solution 1:
Dreamweaver is interpreting that as a regex for syntax highlighting.
The regex notation /regex/
is the most notoriously difficult part to parse in all of Javascript.
Your code is fine. You could try adding spaces around the /. I've often seen that work.
Solution 2:
As stated below, it's a parsing issue with Dreamweaver - interpreting your syntax as a regular expression.
A solution to this problem would be to create a variable for that value. Additionally, it's more efficient than doing the same operation more than once.
var piOver2 = Math.PI / 2;
draw.arc(x, y, radius, piOver2, piOver2, true);
Solution 3:
It is something dumb: Dreamweaver has a bug in it. Your code must still execute. That is a perfectly valid sequence of characters, that does not result in a comment.
Post a Comment for "Expressions With Slashes Are Highlighted Incorrectly"