Skip to content

Commit

Permalink
Update libphonenumber@8.12.56
Browse files Browse the repository at this point in the history
  • Loading branch information
ruimarinho committed Sep 29, 2022
1 parent af3098a commit 2ae949d
Show file tree
Hide file tree
Showing 5 changed files with 233 additions and 225 deletions.
9 changes: 6 additions & 3 deletions src/asyoutypeformatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,17 @@ i18n.phonenumbers.AsYouTypeFormatter.EMPTY_METADATA_
* under numberFormat contains groups of the dollar sign followed by a single
* digit, separated by valid phone number punctuation. This prevents invalid
* punctuation (such as the star # Israeli star numbers) getting into the
* output of the AYTF.
* output of the AYTF. We require that the first group is present in the output
* pattern to ensure no data is lost while formatting; when we format as you
* type, this should always be the case.
* @const
* @type {RegExp}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.ELIGIBLE_FORMAT_PATTERN_ = new RegExp(
'^[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']*' +
'(\\$\\d[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']*)+$');
'^[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']*' + '\\$1'
+ '[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']*(\\$\\d'
+ '[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']*)*$');


/**
Expand Down
Loading

0 comments on commit 2ae949d

Please # to comment.