Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit e3dc7c0

Browse files
committed
Merge pull request #122 from lukepfeiffer10/master
Fix #121
2 parents f9fec2a + 82b0ecf commit e3dc7c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mask.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ angular.module('ui.mask', [])
326326
var maskPlaceholderChars = maskPlaceholder.split(''),
327327
maskPlaceholderCopy, components;
328328

329-
//maskCaretMap can have bad values if the input has the ui-mask attribute implemented as an obversable property, i.e. the demo page
329+
//maskCaretMap can have bad values if the input has the ui-mask attribute implemented as an obversable property, e.g. the demo page
330330
if (maskCaretMap && !isNaN(maskCaretMap[0])) {
331331
//Instead of trying to manipulate the RegEx based on the placeholder characters
332332
//we can simply replace the placeholder characters based on the already built
@@ -337,13 +337,13 @@ angular.module('ui.mask', [])
337337
});
338338
}
339339
maskPlaceholderCopy = maskPlaceholderChars.join('');
340-
components = maskPlaceholderCopy.replace(/[_]+/g, '_').replace(/([^_]+)([a-zA-Z0-9])([^_])/g, '$1$2_$3').split('_');
340+
components = maskPlaceholderCopy.replace(/[_]+/g, '_').split('_');
341341
components = components.filter(function(s) {
342342
return s !== '';
343343
});
344344

345345
// need a string search offset in cases where the mask contains multiple identical components
346-
// I.E. a mask of 99.99.99-999.99
346+
// E.g., a mask of 99.99.99-999.99
347347
var offset = 0;
348348
return components.map(function(c) {
349349
var componentPosition = maskPlaceholderCopy.indexOf(c, offset);

0 commit comments

Comments
 (0)