Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Webstorm IDE complains about Regex Range #7093

Closed
wants to merge 1 commit into from

Conversation

malixsys
Copy link
Contributor

Request Type: bug

How to reproduce: Open angular.js in WebStorm 8, complains that character class may not be used inside character range

Component(s): $compile

Impact: small

Complexity: small

This issue is related to:

Detailed Description:

In CLASS_DIRECTIVE_REGEXP and COMMENT_DIRECTIVE_REGEXP, putting the - character at the end of the character patter speeds up many IDE parsers and alleviates some errors in certain IDE's. (WebStorm 8)
Functionally absolutely equivalent. No test change needed.

Other Comments:

In CLASS_DIRECTIVE_REGEXP and COMMENT_DIRECTIVE_REGEXP, putting the \- character at the end of the character patter speeds up many IDE parsers and alleviates some errors in certain IDE's. (WebStorm 8)
Functionally absolutely equivalent. No test change needed.
@mary-poppins
Copy link

Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.

  • Uses the issue template (#7093)

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@malixsys malixsys changed the title Minor change puts \- at end of character pattern Webstorm IDE complains about Regex Range Apr 11, 2014
@@ -512,8 +512,8 @@ $CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];
function $CompileProvider($provide, $$sanitizeUriProvider) {
var hasDirectives = {},
Suffix = 'Directive',
COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,
CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/;
COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w_\-]+)\s+(.*)$/,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just moved - right by 1 character

@IgorMinar IgorMinar added this to the 1.3.0-beta.6 milestone Apr 15, 2014
@IgorMinar IgorMinar self-assigned this Apr 15, 2014
@mary-poppins
Copy link

I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS.

Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match.

If you signed the CLA as a corporation, please let us know the company's name.

Thanks a bunch!

PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR.
PS2: If you are a Googler, please sign the CLA as well to simplify the CLA verification process.

@petebacondarwin
Copy link
Contributor

@malixsys - can you sign the CLA please?

@malixsys
Copy link
Contributor Author

malixsys commented May 9, 2014

Done. :)

On 9 May 2014 08:37, Pete Bacon Darwin notifications@github.com wrote:

@malixsys https://github.com/malixsys - can you sign the CLA please?


Reply to this email directly or view it on GitHubhttps://github.com//pull/7093#issuecomment-42660950
.

Martin Alix
malix® consulting inc. http://malix.io/
+1 514.515.3469
Q: Why is this email three sentences or less? A:
http://three.sentenc.eshttp://malix.io/

@mary-poppins
Copy link

CLA signature verified! Thank you!

Someone from the team will now triage your PR and it will be processed based on the determined priority (doc updates and fixes with tests are prioritized over other changes).

@malixsys malixsys added cla: yes and removed cla: no labels May 9, 2014
@malixsys
Copy link
Contributor Author

malixsys commented May 9, 2014

Note: signed with github@malix.com

On 9 May 2014 08:37, Pete Bacon Darwin notifications@github.com wrote:

@malixsys https://github.com/malixsys - can you sign the CLA please?


Reply to this email directly or view it on GitHubhttps://github.com//pull/7093#issuecomment-42660950
.

Martin Alix
malix® consulting inc. http://malix.io/
+1 514.515.3469
Q: Why is this email three sentences or less? A:
http://three.sentenc.eshttp://malix.io/

@caitp caitp modified the milestones: 1.3.0-beta.9, 1.3.0-beta.8 May 9, 2014
@IgorMinar IgorMinar modified the milestones: 1.3.0, 1.3.0-beta.9 May 12, 2014
@IgorMinar IgorMinar removed this from the 1.3.0 milestone May 12, 2014
IgorMinar pushed a commit that referenced this pull request May 16, 2014
Minor change puts \- at end of character pattern

In CLASS_DIRECTIVE_REGEXP and COMMENT_DIRECTIVE_REGEXP, putting the \- character at
the end of the character patter speeds up many IDE parsers and alleviates some
errors in certain IDE's. (WebStorm 8)

Functionally absolutely equivalent. No test change needed.

Closes #7093
@IgorMinar IgorMinar closed this in 63f284a May 16, 2014
@IgorMinar
Copy link
Contributor

thanks

RichardLitt pushed a commit to RichardLitt/angular.js that referenced this pull request May 24, 2014
Minor change puts \- at end of character pattern

In CLASS_DIRECTIVE_REGEXP and COMMENT_DIRECTIVE_REGEXP, putting the \- character at
the end of the character patter speeds up many IDE parsers and alleviates some
errors in certain IDE's. (WebStorm 8)

Functionally absolutely equivalent. No test change needed.

Closes angular#7093

Conflicts:
	src/ng/compile.js
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants