You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to changing the function name regexps to exactly match JS identifier syntax (first char is $, _, or alpha; later chars are $, _, or alphanumeric), I removed a \b from the first arm of the regexp that seems unnecessary since it explicitly looks for a \s afterwards anyway.
Added unit tests for various whitespace cases, but we might want to add some more as well (including false positives).
Note that this also fixes the ternary operator case that Peter mentioned, but I couldn't quickly write a unit test for that since we don't have an easy way right now to verify that it doesn't find a match for a nonexistent name. Would be good if someone could add that.
Friday Jun 22, 2012 at 18:55 GMT
Originally opened as adobe/brackets#1119
Fixes #1108.
In addition to changing the function name regexps to exactly match JS identifier syntax (first char is$, _, or alpha; later chars are $ , _, or alphanumeric), I removed a
\b
from the first arm of the regexp that seems unnecessary since it explicitly looks for a\s
afterwards anyway.Added unit tests for various whitespace cases, but we might want to add some more as well (including false positives).
njx included the following code: https://github.com/adobe/brackets/pull/1119/commits
The text was updated successfully, but these errors were encountered: