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

Commit f8a1c56

Browse files
malixsysIgorMinar
authored andcommitted
chore($compile): make webstorm's regexp parser happy
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
1 parent 1138506 commit f8a1c56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ng/compile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,8 @@ $CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];
512512
function $CompileProvider($provide, $$sanitizeUriProvider) {
513513
var hasDirectives = {},
514514
Suffix = 'Directive',
515-
COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,
516-
CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/;
515+
COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w_\-]+)\s+(.*)$/,
516+
CLASS_DIRECTIVE_REGEXP = /(([\d\w_\-]+)(?:\:([^;]+))?;?)/;
517517

518518
// Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes
519519
// The assumption is that future DOM event attribute names will begin with

0 commit comments

Comments
 (0)