diff --git a/lib/stacktrace-parser.js b/lib/stacktrace-parser.js index 5a3fc7a..6e022ff 100644 --- a/lib/stacktrace-parser.js +++ b/lib/stacktrace-parser.js @@ -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 = [], diff --git a/test/stacktrace_parser_test.js b/test/stacktrace_parser_test.js index 83b4299..d6351e6 100644 --- a/test/stacktrace_parser_test.js +++ b/test/stacktrace_parser_test.js @@ -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': [