Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_findFunctionName regex bug. #54

Closed
iansaun opened this issue Aug 23, 2017 · 0 comments · Fixed by #88
Closed

_findFunctionName regex bug. #54

iansaun opened this issue Aug 23, 2017 · 0 comments · Fixed by #88

Comments

@iansaun
Copy link

iansaun commented Aug 23, 2017

Expected Behavior

The "fn_name() {" regex
‌/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*(.?)\s{/
should match code like
"fn_name() { stuff"

Current Behavior

The regex matches this code
if (a) { foo(); } else if (b) { bar(); }
Falsely indicating that foo wraps bar.

Steps to Reproduce (for bugs)

Should be easy to reproduce with a new unit test.

Context

Producing un-minifed stack-traces

Your Environment

  • stacktrace.js version: v2.0.0
  • stacktrace-gps.js version: v3.0

Possible Solution

I'm not familiar with this notation. Suggest removing this regex from the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant