From 5063713473dd93872a65ff75280389ad06f600c3 Mon Sep 17 00:00:00 2001 From: Mauro Amico Date: Sat, 23 Nov 2024 01:22:50 +0100 Subject: [PATCH] fix: phone regex --- src/components/ItaliaTheme/View/Commons/ContactLink.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/ItaliaTheme/View/Commons/ContactLink.jsx b/src/components/ItaliaTheme/View/Commons/ContactLink.jsx index 6b7544aab..cfbfc3d94 100644 --- a/src/components/ItaliaTheme/View/Commons/ContactLink.jsx +++ b/src/components/ItaliaTheme/View/Commons/ContactLink.jsx @@ -34,9 +34,7 @@ const ContactLink = ({ tel, fax, email, label = true, strong = false }) => { const formatTel = (str, type) => str - .split( - /((?:\+?\d{1,3}[-.\s]?)?(?:\(?\d{3}\)?[-.\s]?)?\d{3}[-.\s]?\d{4})/gm, - ) + .split(/((?:\+?\d{1,3}[-.\s]?)?(?:\(?\d{3}\)?[-.\s]?)?\d{3}[-.\s]?\d+)/gm) .map((v, i) => i % 2 === 0 ? ( {` ${v} `}