Autolinker.js icon indicating copy to clipboard operation
Autolinker.js copied to clipboard

Support for European phone numbers

Open yamass opened this issue 5 years ago • 0 comments

Since you asked for it (in the breaking changes section):

Please support different prefixes and notations:

Germany: 0176-12345678 (zero-prefixed with hyphen) France: 0 590 12 34 56 (zero-prefixed with spaces) Poland: xx xxx xx xx (any zwo-digit number as prefix and spaces)

There are probably many many more notations and prefix systems. Basically, to support them all, I see two possibilities:

  1. Introduce an flexible API for matchers (I saw a kind of announcement for that in the release notes / breaking changes section)
  2. Write a separate matcher for every possible notation and prefix system and provide fine-grained control which ones get activated or not. The actual matchers could actually be contributed by others if there is a good API (see 1)).

Anyways, thanks for this awesome utility library!!!

yamass avatar Nov 17 '19 12:11 yamass