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

Commit e6d2439

Browse files
committed
fix($compile): regex fix
1 parent 4dc7675 commit e6d2439

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
@@ -3638,7 +3638,7 @@ SimpleChange.prototype.isFirstChange = function() { return this.previousValue ==
36383638

36393639

36403640
var PREFIX_REGEXP = /^((?:x|data)[:\-_])/i;
3641-
var SPECIAL_CHARS_REGEXP = /([:\-_]+(.))/g;
3641+
var SPECIAL_CHARS_REGEXP = /[:\-_]+(.)/g;
36423642

36433643
/**
36443644
* Converts all accepted directives format into proper directive name.
@@ -3647,7 +3647,7 @@ var SPECIAL_CHARS_REGEXP = /([:\-_]+(.))/g;
36473647
function directiveNormalize(name) {
36483648
return name
36493649
.replace(PREFIX_REGEXP, '')
3650-
.replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
3650+
.replace(SPECIAL_CHARS_REGEXP, function(_, letter, offset) {
36513651
return offset ? letter.toUpperCase() : letter;
36523652
});
36533653
}

0 commit comments

Comments
 (0)