Skip to content

Update Angular error regex to work w/ minified exceptions (fixes #606) #667

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

Merged
merged 1 commit into from
Jul 28, 2016

Conversation

benvinegar
Copy link
Contributor

@benvinegar benvinegar commented Jul 28, 2016

cc @jrencz @mattrobenolt


This change is Reviewable

@@ -6,7 +6,8 @@
'use strict';

// See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js
var angularPattern = /^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.+?)\n(\S+)$/;
var angularPattern = /^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.*?)\n?(\S+)$/;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? is the only meaningful change here, isn't it? Changes in data callback are only refactoring

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also a change to the 2nd match group, from (.+?) to (.*?).

Changes in data callback are only refactoring

Yeah that's just so I could easily write a test to verify the regexes work.

@macqueen
Copy link

Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, 2 unresolved discussions.


test/plugins/angular.test.js, line 39 [r1] (raw file):

        });

        it('should extract type and the angularDocs URL minified exceptions', function () {

not that it matters, but you're missing "from" here


Comments from Reviewable

@benvinegar
Copy link
Contributor Author

not that it matters, but you're missing "from" here

close enuf

@benvinegar benvinegar merged commit e702d84 into master Jul 28, 2016
@benvinegar benvinegar deleted the update-ng-regex branch July 28, 2016 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants