Skip to content

Commit

Permalink
This regex is getting ridiculous.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrobenolt committed Mar 18, 2012
1 parent f2f0e96 commit f3ae631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Expand Up @@ -103,7 +103,7 @@ module.exports.parseStack = function parseStack(stack, callback) {
var lines = stack.split('\n').slice(1), callbacks=lines.length, frames=[], cache={}; var lines = stack.split('\n').slice(1), callbacks=lines.length, frames=[], cache={};


lines.forEach(function(line, index) { lines.forEach(function(line, index) {
var data = line.match(/^\s*at (?:(.+?) )?\(?(.+?)(?::(\d+):(\d+))?\)?$/).slice(1), var data = line.match(/^\s*at (?:(.+(?: \[\w\s+\])?) )?\(?(.+?)(?::(\d+):(\d+))?\)?$/).slice(1),
frame = { frame = {
filename: data[1], filename: data[1],
lineno: ~~data[2] lineno: ~~data[2]
Expand Down

0 comments on commit f3ae631

Please sign in to comment.