Skip to content

Commit

Permalink
Allow spaces in function names
Browse files Browse the repository at this point in the history
  • Loading branch information
frantic authored and Calamari committed Jul 7, 2016
1 parent 8b13469 commit 2c29f8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/stacktrace-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var StackTraceParser = {
*/
parse: function(stackString) {
var chrome = /^\s*at (?:(?:(?:Anonymous function)?|((?:\[object object\])?\S+(?: \[as \S+\])?)) )?\(?((?:file|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
gecko = /^(?:\s*(\S*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i,
gecko = /^(?:\s*([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i,
node = /^\s*at (?:((?:\[object object\])?\S+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i,
lines = stackString.split('\n'),
stack = [],
Expand Down
7 changes: 7 additions & 0 deletions test/stacktrace_parser_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ describe('StackTraceParser', function() {
methodName: 'wrapped',
lineNumber: 51,
column: 30 } ]
},
{
from: "global code@stack_traces/test:83:55",
to: [ { file: 'stack_traces/test',
methodName: 'global code',
lineNumber: 83,
column: 55 } ]
}
],
'Internet Explorer': [
Expand Down

0 comments on commit 2c29f8e

Please sign in to comment.