gkucmierz/social-links

Local LinkedIn Urls

Closed this issue · 1 comments

LinkedIn URLs are sometimes localized. For example if you search for me on Google, you'll get this link: https://de.linkedin.com/in/anton-begehr/.
socialLinks.detectProfile() detects LinkedIn profiles on subdomain www correctly but fails on the de subdomain:

> socialLinks.detectProfile('https://www.linkedin.com/in/johndoe')
'linkedin'
> socialLinks.detectProfile('https://de.linkedin.com/in/johndoe')
''

This should work in version #1.10.1

 {
      match: '(https?://)?([a-z]{2,3}.)?linkedin.com/in/({PROFILE_ID})/?', group: 3, type: TYPE_DESKTOP,
      pattern: 'https://linkedin.com/in/{PROFILE_ID}'
    },
    {
      match: '(https?://)?([a-z]{2,3}.)?linkedin.com/mwlite/in/({PROFILE_ID})/?', group: 3, type: TYPE_MOBILE,
      pattern: 'https://linkedin.com/mwlite/in/{PROFILE_ID}'
    },