Skip to content

Commit f17f079

Browse files
malixsysRichardLitt
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 angular#7093 Conflicts: src/ng/compile.js
1 parent 0268069 commit f17f079

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ng/compile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ $CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];
525525
function $CompileProvider($provide, $$sanitizeUriProvider) {
526526
var hasDirectives = {},
527527
Suffix = 'Directive',
528-
COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,
529-
CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/,
528+
COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w_\-]+)\s+(.*)$/,
529+
CLASS_DIRECTIVE_REGEXP = /(([\d\w_\-]+)(?:\:([^;]+))?;?)/,
530530
ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset');
531531

532532
// Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes

0 commit comments

Comments
 (0)