microsoft / linkcheckermd

A VSCode extension that check links in Markdown to ensure they are valid.
MIT License
16 stars 20 forks source link

Update country code regex #34

Closed jamarw closed 4 years ago

jamarw commented 4 years ago

A user reported a misidentified language reference in URL so I created this PR to update the country code regex to look for locales after the domain.

Here's an example topic that contains links that reference a service but the extension assumes the string is a country code so it reports that the link contains a language reference:

"Link https://docs.microsoft.com/windows-server/identity/ad-ds/manage/ad-forest-recovery-single-domain-in-multidomain-recovery contains a language reference: undefined"

The updated regex will check for the locale syntax immediately after the domain i.e. https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/manage/ad-forest-recovery-single-domain-in-multidomain-recovery