adobe/brackets — pull request #1119 by njx (2012-06-22 18:55:09+00:00)
Title: Make function regexp match JS identifier syntax exactly

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